Class: SimpleNavigation::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_navigation.rb

Overview

Simple Navigation configuration class

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



131
132
133
# File 'lib/simple_navigation.rb', line 131

def initialize
  self.navigation = {}
end

Instance Attribute Details

Returns the value of attribute navigation.



129
130
131
# File 'lib/simple_navigation.rb', line 129

def navigation
  @navigation
end

Instance Method Details

#config {|builder| ... } ⇒ Object

Yields:

  • (builder)


135
136
137
138
139
# File 'lib/simple_navigation.rb', line 135

def config(&block)
  builder = Builder.new
  yield builder
  builder.navigations.each { |tmp| self.navigation[tmp[:name]] = tmp }
end