Class: Avo::Resources::Controls::ItemsHolder
- Inherits:
-
Object
- Object
- Avo::Resources::Controls::ItemsHolder
- Defined in:
- lib/avo/resources/controls/items_holder.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
- #add_item(instance) ⇒ Object
-
#initialize ⇒ ItemsHolder
constructor
A new instance of ItemsHolder.
Constructor Details
#initialize ⇒ ItemsHolder
Returns a new instance of ItemsHolder.
7 8 9 |
# File 'lib/avo/resources/controls/items_holder.rb', line 7 def initialize @items = [] end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
5 6 7 |
# File 'lib/avo/resources/controls/items_holder.rb', line 5 def items @items end |
Instance Method Details
#add_item(instance) ⇒ Object
11 12 13 14 15 |
# File 'lib/avo/resources/controls/items_holder.rb', line 11 def add_item(instance) @items << instance self end |