Class: Turnip::Node::Step
Overview
Note:
Step metadata generated by Gherkin
{
type: :Step,
location: { line: 10, column: 3 },
keyword: 'Step',
text: 'Step description',
argument: {}, # DocString or DataTable
}
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #argument ⇒ Object
-
#description ⇒ Object
Backward compatibility.
- #keyword ⇒ Object
- #text ⇒ Object
- #to_s ⇒ Object
Methods inherited from Base
Methods included from HasLocation
Constructor Details
This class inherits a constructor from Turnip::Node::Base
Instance Method Details
#argument ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/turnip/node/step.rb', line 33 def argument @argument ||= case when @raw[:doc_string] doc_string(@raw[:doc_string]) when @raw[:data_table] data_table(@raw[:data_table]) end end |
#description ⇒ Object
Backward compatibility
29 30 31 |
# File 'lib/turnip/node/step.rb', line 29 def description text end |
#keyword ⇒ Object
18 19 20 |
# File 'lib/turnip/node/step.rb', line 18 def keyword @raw[:keyword] end |
#text ⇒ Object
22 23 24 |
# File 'lib/turnip/node/step.rb', line 22 def text @raw[:text] end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/turnip/node/step.rb', line 42 def to_s "#{keyword}#{text}" end |