Module: SimpleNavigation
- Defined in:
- lib/simple_navigation.rb,
lib/simple_navigation/item.rb,
lib/simple_navigation/configuration.rb,
lib/simple_navigation/renderer/base.rb,
lib/simple_navigation/renderer/list.rb,
lib/simple_navigation/item_container.rb,
lib/simple_navigation/controller_methods.rb
Overview
TODO: add :except and :only options to navigation method
Defined Under Namespace
Modules: ControllerMethods, Renderer Classes: Configuration, Item, ItemContainer
Class Method Summary collapse
-
.config ⇒ Object
Returns the singleton instance of the SimpleNavigation::Configuration.
-
.load_config ⇒ Object
Reads the specified config_file and stores it for later evaluation.
-
.primary_navigation ⇒ Object
Returns the ItemContainer that contains the items for the primary navigation.
Class Method Details
.config ⇒ Object
Returns the singleton instance of the SimpleNavigation::Configuration
16 17 18 |
# File 'lib/simple_navigation.rb', line 16 def self.config Configuration.instance end |
.load_config ⇒ Object
Reads the specified config_file and stores it for later evaluation.
9 10 11 12 13 |
# File 'lib/simple_navigation.rb', line 9 def self.load_config raise "config_file_path is not set!" unless self.config_file_path raise "Config file '#{config_file_path}' does not exists!" unless File.exists?(self.config_file_path) self.config_file = IO.read(self.config_file_path) end |
.primary_navigation ⇒ Object
Returns the ItemContainer that contains the items for the primary navigation
21 22 23 |
# File 'lib/simple_navigation.rb', line 21 def self. config. end |