Module: NfgUi::Components::Utilities::Renderable
- Included in:
- Base, Elements::Alert, Elements::Badge, Elements::Breadcrumb, Elements::BreadcrumbItem, Elements::Button, Elements::CardFooter, Elements::CardHeader, Elements::CardImage, Elements::CardImageOverlay, Elements::CarouselCaption, Elements::CarouselControl, Elements::CarouselIndicators, Elements::CarouselItem, Elements::DropdownDivider, Elements::DropdownHeader, Elements::DropdownItem, Elements::DropdownToggle, Elements::Embed, Elements::InputGroup, Elements::ListGroupItem, Elements::MediaBody, Elements::MediaObject, Elements::ModalBody, Elements::ModalFooter, Elements::ModalHeader, Elements::Nav, Elements::NavItem, Elements::NavLink, Elements::NavbarBrand, Elements::NavbarText, Elements::NavbarToggler, Elements::PageItem, Elements::Popover, Elements::ProgressBar, Elements::TabPane, Elements::Table, Patterns::ButtonGroup, Patterns::ButtonToolbar, Patterns::Card, Patterns::Carousel, Patterns::Collapse, Patterns::Dropdown, Patterns::DropdownMenu, Patterns::Jumbotron, Patterns::ListGroup, Patterns::Media, Patterns::Modal, Patterns::Navbar, Patterns::NavbarNav, Patterns::PageHeader, Patterns::Pagination, Patterns::Progress, Patterns::TabContent
- Defined in:
- lib/nfg_ui/components/utilities/renderable.rb
Overview
Allows us to skip -if statements in our code and directly setup a render_if / render_unless right on the component.
Instance Method Summary collapse
Instance Method Details
#render_if ⇒ Object
7 8 9 |
# File 'lib/nfg_ui/components/utilities/renderable.rb', line 7 def render_if .fetch(:render_if, nil) end |
#render_unless ⇒ Object
11 12 13 |
# File 'lib/nfg_ui/components/utilities/renderable.rb', line 11 def render_unless .fetch(:render_unless, nil) end |