Class: Gherkin::Formatter::Model::Step
- Inherits:
-
BasicStatement
- Object
- Hashable
- BasicStatement
- Gherkin::Formatter::Model::Step
- Defined in:
- lib/gherkin/formatter/model.rb
Instance Attribute Summary collapse
-
#doc_string ⇒ Object
Returns the value of attribute doc_string.
-
#rows ⇒ Object
Returns the value of attribute rows.
Attributes inherited from BasicStatement
#comments, #keyword, #line, #name
Instance Method Summary collapse
Methods inherited from BasicStatement
#first_non_comment_line, #initialize
Methods inherited from Hashable
Constructor Details
This class inherits a constructor from Gherkin::Formatter::Model::BasicStatement
Instance Attribute Details
#doc_string ⇒ Object
Returns the value of attribute doc_string.
116 117 118 |
# File 'lib/gherkin/formatter/model.rb', line 116 def doc_string @doc_string end |
#rows ⇒ Object
Returns the value of attribute rows.
115 116 117 |
# File 'lib/gherkin/formatter/model.rb', line 115 def rows @rows end |
Instance Method Details
#line_range ⇒ Object
118 119 120 121 122 123 124 125 126 |
# File 'lib/gherkin/formatter/model.rb', line 118 def line_range range = super if(rows) range = range.first..rows[-1].line elsif(doc_string) range = range.first..doc_string.line_range.last end range end |
#outline_args ⇒ Object
132 133 134 135 136 137 138 |
# File 'lib/gherkin/formatter/model.rb', line 132 def outline_args offset = 0 name.scan(/<[^<]*>/).map do |val| offset = name.index(val, offset) Argument.new(offset, val) end end |
#replay(formatter) ⇒ Object
128 129 130 |
# File 'lib/gherkin/formatter/model.rb', line 128 def replay(formatter) formatter.step(self) end |