Class: SimplerNavigation::Configuration
- Inherits:
-
Object
- Object
- SimplerNavigation::Configuration
- Defined in:
- lib/simpler_navigation/configuration.rb
Instance Attribute Summary collapse
-
#active_leaf_class ⇒ Object
Returns the value of attribute active_leaf_class.
-
#root_item ⇒ Object
readonly
Returns the value of attribute root_item.
-
#selected_class ⇒ Object
Returns the value of attribute selected_class.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #items ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 |
# File 'lib/simpler_navigation/configuration.rb', line 11 def initialize @selected_class = "selected" @active_leaf_class = "simple-navigation-active-leaf" if block_given? yield self end end |
Instance Attribute Details
#active_leaf_class ⇒ Object
Returns the value of attribute active_leaf_class.
4 5 6 |
# File 'lib/simpler_navigation/configuration.rb', line 4 def active_leaf_class @active_leaf_class end |
#root_item ⇒ Object (readonly)
Returns the value of attribute root_item.
5 6 7 |
# File 'lib/simpler_navigation/configuration.rb', line 5 def root_item @root_item end |
#selected_class ⇒ Object
Returns the value of attribute selected_class.
3 4 5 |
# File 'lib/simpler_navigation/configuration.rb', line 3 def selected_class @selected_class end |
Class Method Details
.run(&block) ⇒ Object
7 8 9 |
# File 'lib/simpler_navigation/configuration.rb', line 7 def self.run(&block) SimplerNavigation.config = new(&block) end |