Module: NfgUi::Components::Utilities::Renderable

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_ifObject



7
8
9
# File 'lib/nfg_ui/components/utilities/renderable.rb', line 7

def render_if
  options.fetch(:render_if, nil)
end

#render_unlessObject



11
12
13
# File 'lib/nfg_ui/components/utilities/renderable.rb', line 11

def render_unless
  options.fetch(:render_unless, nil)
end