Class: NavLinks::LinkGenerator
- Inherits:
-
Object
- Object
- NavLinks::LinkGenerator
- Includes:
- ActionView::Helpers::UrlHelper
- Defined in:
- lib/nav_links/link_generator.rb
Instance Method Summary collapse
-
#initialize(request, title, path, html_options = {}, options = {}) ⇒ LinkGenerator
constructor
A new instance of LinkGenerator.
- #to_html ⇒ Object
Constructor Details
#initialize(request, title, path, html_options = {}, options = {}) ⇒ LinkGenerator
5 6 7 8 9 10 11 |
# File 'lib/nav_links/link_generator.rb', line 5 def initialize(request, title, path, = {}, = {}) @request = request @title = title @path = path = = end |
Instance Method Details
#to_html ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/nav_links/link_generator.rb', line 13 def to_html html = link if [:wrapper] html = content_tag([:wrapper], html, :class => wrapper_classes) end html.html_safe end |