Class: Navigasmic::Builder::ListBuilder::Configuration
- Inherits:
-
Base::Configuration
- Object
- Base::Configuration
- Navigasmic::Builder::ListBuilder::Configuration
- Defined in:
- lib/navigasmic/builders/list_builder.rb
Instance Attribute Summary collapse
-
#disabled_class ⇒ Object
Returns the value of attribute disabled_class.
-
#group_tag ⇒ Object
Returns the value of attribute group_tag.
-
#has_nested_class ⇒ Object
Returns the value of attribute has_nested_class.
-
#highlighted_class ⇒ Object
Returns the value of attribute highlighted_class.
-
#is_nested_class ⇒ Object
Returns the value of attribute is_nested_class.
-
#item_class ⇒ Object
Returns the value of attribute item_class.
-
#item_tag ⇒ Object
Returns the value of attribute item_tag.
-
#label_generator ⇒ Object
Returns the value of attribute label_generator.
-
#link_generator ⇒ Object
Returns the value of attribute link_generator.
-
#wrapper_class ⇒ Object
Returns the value of attribute wrapper_class.
-
#wrapper_tag ⇒ Object
Returns the value of attribute wrapper_tag.
Attributes inherited from Base::Configuration
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/navigasmic/builders/list_builder.rb', line 9 def initialize # which keys (for other builder) should be removed from options @excluded_keys = [:map] # tag configurations @wrapper_tag = :ul @group_tag = :ul @item_tag = :li # class configurations @wrapper_class = 'semantic-navigation' @item_class = nil @has_nested_class = 'has-nested' @is_nested_class = 'is-nested' @disabled_class = 'disabled' @highlighted_class = 'active' # generator callbacks @link_generator = proc{ |label, link, , is_nested| link_to(label, link, ) } @label_generator = proc{ |label, is_linked, is_nested| "<span>#{label}</span>" } super end |
Instance Attribute Details
#disabled_class ⇒ Object
Returns the value of attribute disabled_class.
5 6 7 |
# File 'lib/navigasmic/builders/list_builder.rb', line 5 def disabled_class @disabled_class end |
#group_tag ⇒ Object
Returns the value of attribute group_tag.
6 7 8 |
# File 'lib/navigasmic/builders/list_builder.rb', line 6 def group_tag @group_tag end |
#has_nested_class ⇒ Object
Returns the value of attribute has_nested_class.
5 6 7 |
# File 'lib/navigasmic/builders/list_builder.rb', line 5 def has_nested_class @has_nested_class end |
#highlighted_class ⇒ Object
Returns the value of attribute highlighted_class.
5 6 7 |
# File 'lib/navigasmic/builders/list_builder.rb', line 5 def highlighted_class @highlighted_class end |
#is_nested_class ⇒ Object
Returns the value of attribute is_nested_class.
5 6 7 |
# File 'lib/navigasmic/builders/list_builder.rb', line 5 def is_nested_class @is_nested_class end |
#item_class ⇒ Object
Returns the value of attribute item_class.
5 6 7 |
# File 'lib/navigasmic/builders/list_builder.rb', line 5 def item_class @item_class end |
#item_tag ⇒ Object
Returns the value of attribute item_tag.
6 7 8 |
# File 'lib/navigasmic/builders/list_builder.rb', line 6 def item_tag @item_tag end |
#label_generator ⇒ Object
Returns the value of attribute label_generator.
7 8 9 |
# File 'lib/navigasmic/builders/list_builder.rb', line 7 def label_generator @label_generator end |
#link_generator ⇒ Object
Returns the value of attribute link_generator.
7 8 9 |
# File 'lib/navigasmic/builders/list_builder.rb', line 7 def link_generator @link_generator end |
#wrapper_class ⇒ Object
Returns the value of attribute wrapper_class.
5 6 7 |
# File 'lib/navigasmic/builders/list_builder.rb', line 5 def wrapper_class @wrapper_class end |
#wrapper_tag ⇒ Object
Returns the value of attribute wrapper_tag.
6 7 8 |
# File 'lib/navigasmic/builders/list_builder.rb', line 6 def wrapper_tag @wrapper_tag end |