Class: SimpleNavigation::Adapters::Padrino
- Defined in:
- lib/simple_navigation/adapters/padrino.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Sinatra
#context_for_eval, #current_page?, #initialize, #request_path, #request_uri
Methods inherited from Base
#context_for_eval, #current_page?, #request_path, #request_uri
Constructor Details
This class inherits a constructor from SimpleNavigation::Adapters::Sinatra
Class Method Details
.register(app) ⇒ Object
4 5 6 7 |
# File 'lib/simple_navigation/adapters/padrino.rb', line 4 def self.register(app) SimpleNavigation.set_env(::Padrino.root, ::Padrino.env) ::Padrino::Application.send(:helpers, SimpleNavigation::Helpers) end |
Instance Method Details
#content_tag(type, content, options = {}) ⇒ Object
13 14 15 |
# File 'lib/simple_navigation/adapters/padrino.rb', line 13 def content_tag(type, content, = {}) context.content_tag(type, content.html_safe, ) end |
#link_to(name, url, options = {}) ⇒ Object
9 10 11 |
# File 'lib/simple_navigation/adapters/padrino.rb', line 9 def link_to(name, url, = {}) context.link_to(name, url, ) end |