Class: NavLinks::ViewHelpers::NavLinksOptions
- Inherits:
-
Object
- Object
- NavLinks::ViewHelpers::NavLinksOptions
- Defined in:
- lib/nav_links/view_helpers.rb
Instance Method Summary collapse
-
#initialize(base, options = {}) ⇒ NavLinksOptions
constructor
A new instance of NavLinksOptions.
- #link_to(*args, &block) ⇒ Object (also: #nav_link_to)
Constructor Details
#initialize(base, options = {}) ⇒ NavLinksOptions
Returns a new instance of NavLinksOptions.
19 20 21 22 |
# File 'lib/nav_links/view_helpers.rb', line 19 def initialize(base, = {}) @base = base = end |
Instance Method Details
#link_to(*args, &block) ⇒ Object Also known as:
24 25 26 27 28 29 |
# File 'lib/nav_links/view_helpers.rb', line 24 def link_to(*args, &block) index = block_given? ? 2 : 3 args[index] = .merge(args[index] || {}) @base.nav_link_to(*args, &block) end |