Class: Collection
Direct Known Subclasses
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
Attributes inherited from Item
Instance Method Summary collapse
-
#initialize(content_str) ⇒ Collection
constructor
A new instance of Collection.
- #to_s ⇒ Object
Constructor Details
#initialize(content_str) ⇒ Collection
Returns a new instance of Collection.
38 39 40 41 |
# File 'lib/cuker/models/models_ready.rb', line 38 def initialize content_str super content_str @items = [] end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
35 36 37 |
# File 'lib/cuker/models/models_ready.rb', line 35 def items @items end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
36 37 38 |
# File 'lib/cuker/models/models_ready.rb', line 36 def keyword @keyword end |
Instance Method Details
#to_s ⇒ Object
43 44 45 |
# File 'lib/cuker/models/models_ready.rb', line 43 def to_s ([super] + items.map(&:to_s)).join "\n" end |