Class: BuildMaster::MenuGroup
- Inherits:
-
Object
- Object
- BuildMaster::MenuGroup
- Defined in:
- lib/buildmaster/site/template_builder.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#link ⇒ Object
Returns the value of attribute link.
-
#more ⇒ Object
Returns the value of attribute more.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #add_item(item) ⇒ Object
- #add_to_menu_items ⇒ Object
-
#initialize(title, link) ⇒ MenuGroup
constructor
A new instance of MenuGroup.
- #menu_item(title, link) ⇒ Object
Constructor Details
#initialize(title, link) ⇒ MenuGroup
Returns a new instance of MenuGroup.
18 19 20 21 22 |
# File 'lib/buildmaster/site/template_builder.rb', line 18 def initialize(title, link) @title = title @link = link @items = Array.new end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
15 16 17 |
# File 'lib/buildmaster/site/template_builder.rb', line 15 def items @items end |
#link ⇒ Object
Returns the value of attribute link.
15 16 17 |
# File 'lib/buildmaster/site/template_builder.rb', line 15 def link @link end |
#more ⇒ Object
Returns the value of attribute more.
15 16 17 |
# File 'lib/buildmaster/site/template_builder.rb', line 15 def more @more end |
#title ⇒ Object
Returns the value of attribute title.
15 16 17 |
# File 'lib/buildmaster/site/template_builder.rb', line 15 def title @title end |
Instance Method Details
#add_item(item) ⇒ Object
34 35 36 |
# File 'lib/buildmaster/site/template_builder.rb', line 34 def add_item(item) @items.push(item) end |