Class: Navigasmic::Builder::CrumbBuilder::Configuration

Inherits:
Base::Configuration show all
Defined in:
lib/navigasmic/builders/crumb_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.


8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/navigasmic/builders/crumb_builder.rb', line 8

def initialize
  # which keys (for other builder) should be removed from options
  @excluded_keys = [:map]

  # class configurations
  @item_class = nil

  # generator callbacks
  @link_generator = proc{ |label, link, options, is_nested| link_to(label, link, options.delete(:link_html)) }
  @label_generator = proc{ |label, is_linked, is_nested| "<span>#{label}</span>" }

  super
end

Instance Attribute Details

#item_classObject

Returns the value of attribute item_class


5
6
7
# File 'lib/navigasmic/builders/crumb_builder.rb', line 5

def item_class
  @item_class
end

#label_generatorObject

Returns the value of attribute label_generator


6
7
8
# File 'lib/navigasmic/builders/crumb_builder.rb', line 6

def label_generator
  @label_generator
end

Returns the value of attribute link_generator


6
7
8
# File 'lib/navigasmic/builders/crumb_builder.rb', line 6

def link_generator
  @link_generator
end