Module: NfgUi::UI::Utilities::Initializer

Includes:
ActionView::Helpers::CaptureHelper, Haml::Helpers
Included in:
Bootstrap, NetworkForGood
Defined in:
lib/nfg_ui/ui/utilities/initializer.rb

Overview

Centralizes initialization for the UI namespaces

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_nameObject

Returns the value of attribute class_name.



8
9
10
# File 'lib/nfg_ui/ui/utilities/initializer.rb', line 8

def class_name
  @class_name
end

#componentObject

Returns the value of attribute component.



8
9
10
# File 'lib/nfg_ui/ui/utilities/initializer.rb', line 8

def component
  @component
end

#component_nameObject

Returns the value of attribute component_name.



8
9
10
# File 'lib/nfg_ui/ui/utilities/initializer.rb', line 8

def component_name
  @component_name
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/nfg_ui/ui/utilities/initializer.rb', line 8

def options
  @options
end

#traitsObject

Returns the value of attribute traits.



8
9
10
# File 'lib/nfg_ui/ui/utilities/initializer.rb', line 8

def traits
  @traits
end

Instance Method Details

#render_componentObject



21
22
23
24
25
# File 'lib/nfg_ui/ui/utilities/initializer.rb', line 21

def render_component
  component.render
rescue NotImplementedError
  view_context.render partial: partial_path, locals: { component_name => component }
end