Module: Mariner
- Defined in:
- lib/mariner.rb,
lib/mariner/url.rb,
lib/mariner/store.rb,
lib/mariner/errors.rb,
lib/mariner/helper.rb,
lib/mariner/railtie.rb,
lib/mariner/version.rb,
lib/mariner/renderer/base.rb,
lib/mariner/unordered_list_renderer.rb
Defined Under Namespace
Modules: Errors, Helper, Renderer Classes: Railtie, Store, UnorderedListRenderer, Url
Constant Summary collapse
- VERSION =
"0.0.3"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
-
.rendering_strategies ⇒ Object
Returns the value of attribute rendering_strategies.
Class Method Summary collapse
-
.configure(&block) ⇒ Object
Public: The public interface to navigation API.
- .include_helper ⇒ Object
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
18 19 20 |
# File 'lib/mariner.rb', line 18 def configuration @configuration end |
.rendering_strategies ⇒ Object
Returns the value of attribute rendering_strategies.
18 19 20 |
# File 'lib/mariner.rb', line 18 def rendering_strategies @rendering_strategies end |
Class Method Details
.configure(&block) ⇒ Object
Public: The public interface to navigation API
Examples:
Mariner.configure do
an_arbitrary_group do
root_path "Go Home" #=> where `root_path` is a Rails route helper
users_path "Manage Users", { "data-name" => "go-home" } #=> note the optional attributes hash. This
# is used by rendering strategies
end
end
37 38 39 40 |
# File 'lib/mariner.rb', line 37 def self.configure(&block) self.configuration ||= Store.new.tap { |s| s.virtual = true } self.configuration.instance_eval &block end |