module NfgUi::Components::Utilities::Renderable

Allows us to skip -if statements in our code and directly setup a render_if / render_unless right on the component.

Public Instance Methods

render_if() click to toggle source
# File lib/nfg_ui/components/utilities/renderable.rb, line 7
def render_if
  options.fetch(:render_if, nil)
end
render_unless() click to toggle source
# File lib/nfg_ui/components/utilities/renderable.rb, line 11
def render_unless
  options.fetch(:render_unless, nil)
end

Private Instance Methods

non_html_attribute_options() click to toggle source
Calls superclass method
# File lib/nfg_ui/components/utilities/renderable.rb, line 17
def non_html_attribute_options
  super.push(:render_if,
             :render_unless)
end