class SimpleNavigation::Adapters::Base
This is the base class for all adapters. This class mainly exists for documenting reasons. It lists all the methods that an adapter should implement.
Attributes
context[R]
request[R]
Public Class Methods
register()
click to toggle source
This method is usually called when the framework is initialized. It should call SimpleNavigation.set_env
and install SimpleNavigation::Helpers
where appropriate.
# File lib/simple_navigation/adapters/base.rb, line 13 def self.register; end
Public Instance Methods
content_tag(type, content, options = {})
click to toggle source
Returns a tag of the specified type, content and options. Used for rendering.
# File lib/simple_navigation/adapters/base.rb, line 34 def content_tag(type, content, options = {}); end
context_for_eval()
click to toggle source
Returns the context in which the config files will be evaluated
# File lib/simple_navigation/adapters/base.rb, line 22 def context_for_eval; end
current_page?(url)
click to toggle source
Returns true if the current request’s url matches the specified url. Used to determine if an item should be autohighlighted.
# File lib/simple_navigation/adapters/base.rb, line 26 def current_page?(url); end
link_to(name, url, options = {})
click to toggle source
Returns a link with the specified name, url and options. Used for rendering.
# File lib/simple_navigation/adapters/base.rb, line 30 def link_to(name, url, options = {}); end
request_path()
click to toggle source
Returns the path without query params
# File lib/simple_navigation/adapters/base.rb, line 19 def request_path; end
request_uri()
click to toggle source
Returns the full path incl. query params
# File lib/simple_navigation/adapters/base.rb, line 16 def request_uri; end