Class: SimpleNavigation::ItemAdapter::Item
- Inherits:
-
Object
- Object
- SimpleNavigation::ItemAdapter::Item
- Defined in:
- lib/simple_navigation/item_adapter.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(item) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(item) ⇒ Item
Returns a new instance of Item.
35 36 37 38 39 40 41 |
# File 'lib/simple_navigation/item_adapter.rb', line 35 def initialize(item) @key = item[:key] @name = item[:name] @url = item[:url] @options = item[:options] || {} @items = item[:items] || [] end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
33 34 35 |
# File 'lib/simple_navigation/item_adapter.rb', line 33 def items @items end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
33 34 35 |
# File 'lib/simple_navigation/item_adapter.rb', line 33 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'lib/simple_navigation/item_adapter.rb', line 33 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
33 34 35 |
# File 'lib/simple_navigation/item_adapter.rb', line 33 def @options end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
33 34 35 |
# File 'lib/simple_navigation/item_adapter.rb', line 33 def url @url end |