lib/simple_navigation/item.rb in simple-navigation-1.2.1 vs lib/simple_navigation/item.rb in simple-navigation-1.2.2
- old
+ new
@@ -1,16 +1,17 @@
module SimpleNavigation
# Represents an item in your navigation. Gets generated by the item method in the config-file.
class Item
- attr_reader :key, :name, :url, :sub_navigation
+ attr_reader :key, :name, :url, :sub_navigation, :method
# see ItemContainer#item
- def initialize(key, name, url, html_options, sub_nav_block)
+ def initialize(key, name, url, options, sub_nav_block)
@key = key
+ @method = options.delete(:method)
@name = name
@url = url
- @html_options = html_options
+ @html_options = options
if sub_nav_block
@sub_navigation = ItemContainer.new
sub_nav_block.call @sub_navigation
end
end
\ No newline at end of file