Class: RailsMenu::Element
- Inherits:
-
Object
- Object
- RailsMenu::Element
- Defined in:
- lib/rails_menu/element.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#id ⇒ Object
Returns the value of attribute id.
-
#options ⇒ Object
Returns the value of attribute options.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(id, url = '', options = {}) ⇒ Element
constructor
A new instance of Element.
Constructor Details
#initialize(id, url = '', options = {}) ⇒ Element
Returns a new instance of Element.
6 7 8 9 10 11 |
# File 'lib/rails_menu/element.rb', line 6 def initialize(id, url = '', = {}) @id = id.to_s @url = url @options = @active = false end |
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
4 5 6 |
# File 'lib/rails_menu/element.rb', line 4 def active @active end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/rails_menu/element.rb', line 4 def id @id end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/rails_menu/element.rb', line 4 def @options end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/rails_menu/element.rb', line 4 def url @url end |