Class: Collection

Inherits:
Item
  • Object
show all
Defined in:
lib/cuker/models/models_ready.rb

Direct Known Subclasses

SimpleGherkinCollection, Table, Tags

Instance Attribute Summary collapse

Attributes inherited from Item

#content

Instance Method Summary collapse

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

#itemsObject

Returns the value of attribute items.



35
36
37
# File 'lib/cuker/models/models_ready.rb', line 35

def items
  @items
end

#keywordObject (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_sObject



43
44
45
# File 'lib/cuker/models/models_ready.rb', line 43

def to_s
  ([super] + items.map(&:to_s)).join "\n"
end