Class: NavHelper::NavCreator
- Inherits:
-
Object
- Object
- NavHelper::NavCreator
- Includes:
- ActionView::Helpers, FormatHelper
- Defined in:
- app/helpers/nav_helper.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
Instance Method Summary collapse
-
#initialize(options) ⇒ NavCreator
constructor
A new instance of NavCreator.
- #render ⇒ Object
Methods included from FormatHelper
#prepend_class, #squeeze_n_strip
Constructor Details
#initialize(options) ⇒ NavCreator
Returns a new instance of NavCreator.
10 11 12 |
# File 'app/helpers/nav_helper.rb', line 10 def initialize() = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
7 8 9 |
# File 'app/helpers/nav_helper.rb', line 7 def end |
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
8 9 10 |
# File 'app/helpers/nav_helper.rb', line 8 def output_buffer @output_buffer end |
Instance Method Details
#render ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/helpers/nav_helper.rb', line 14 def render = { as: .delete(:as).presence || :tabs, layout: .delete(:layout).presence } tag = .delete(:tag).try(:to_sym).presence || :ul active = .delete(:active) prepend_class(, 'nav', build_nav_class()) .merge!(data: {bui: 'nav', active_el_locator: active}) [tag, ] end |