Class: Navigasmic::Builder::ListBuilder::Configuration

Inherits:
Base::Configuration show all
Defined in:
lib/navigasmic/builders/list_builder.rb

Instance Attribute Summary collapse

Attributes inherited from Base::Configuration

#excluded_keys

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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, options, is_nested| link_to(label, link, options) }
  @label_generator = proc{ |label, is_linked, is_nested| "<span>#{label}</span>" }

  super
end

Instance Attribute Details

#disabled_classObject

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_tagObject

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_classObject

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_classObject

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_classObject

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_classObject

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_tagObject

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_generatorObject

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

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_classObject

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_tagObject

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