Class: SimpleGherkinCollection
- Inherits:
-
Collection
- Object
- Item
- Collection
- SimpleGherkinCollection
- Defined in:
- lib/cuker/models/models_ready.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Collection
Attributes inherited from Item
Instance Method Summary collapse
-
#initialize(content_str, keyword) ⇒ SimpleGherkinCollection
constructor
A new instance of SimpleGherkinCollection.
- #parse_title(content, keyword) ⇒ Object
Methods inherited from Collection
Methods inherited from Item
Constructor Details
#initialize(content_str, keyword) ⇒ SimpleGherkinCollection
70 71 72 73 |
# File 'lib/cuker/models/models_ready.rb', line 70 def initialize content_str, keyword super content_str @title = parse_title content_str, keyword end |
Instance Attribute Details
#comments ⇒ Object
Returns the value of attribute comments.
68 69 70 |
# File 'lib/cuker/models/models_ready.rb', line 68 def comments @comments end |
#title ⇒ Object
Returns the value of attribute title.
68 69 70 |
# File 'lib/cuker/models/models_ready.rb', line 68 def title @title end |
Instance Method Details
#parse_title(content, keyword) ⇒ Object
75 76 77 78 79 |
# File 'lib/cuker/models/models_ready.rb', line 75 def parse_title content, keyword match = content[/^\s*#{keyword}(.*)$/, 1] warn "no matches for '#{keyword}' in '#{content}'" unless match match end |