Class: RailsMenu::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_menu/element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = '', options = {})
  @id = id.to_s
  @url = url
  @options = options
  @active = false
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



4
5
6
# File 'lib/rails_menu/element.rb', line 4

def active
  @active
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/rails_menu/element.rb', line 4

def id
  @id
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/rails_menu/element.rb', line 4

def options
  @options
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/rails_menu/element.rb', line 4

def url
  @url
end