Class: Xebec::NavItem
- Inherits:
-
Object
- Object
- Xebec::NavItem
- Defined in:
- lib/xebec/nav_item.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, href = nil, html_options = {}) ⇒ NavItem
constructor
Create a new navigation item.
Constructor Details
#initialize(name, href = nil, html_options = {}) ⇒ NavItem
Create a new navigation item.
15 16 17 18 |
# File 'lib/xebec/nav_item.rb', line 15 def initialize(name, href = nil, = {}) raise ArgumentError.new("#{name || '<nil>'} is not a valid name for a navigation item") if name.blank? @name, @href, @html_options = name, href, end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
5 6 7 |
# File 'lib/xebec/nav_item.rb', line 5 def href @href end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
5 6 7 |
# File 'lib/xebec/nav_item.rb', line 5 def @html_options end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/xebec/nav_item.rb', line 5 def name @name end |