Class: GherkinRuby::AST::Scenario
- Includes:
- Enumerable
- Defined in:
- lib/gherkin_ruby/ast.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#steps ⇒ Object
readonly
Returns the value of attribute steps.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Attributes inherited from Node
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(name, steps = [], tags = []) ⇒ Scenario
constructor
A new instance of Scenario.
- #line ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(name, steps = [], tags = []) ⇒ Scenario
Returns a new instance of Scenario.
59 60 61 62 63 |
# File 'lib/gherkin_ruby/ast.rb', line 59 def initialize(name, steps=[], =[]) @name = name.to_s @steps = steps @tags = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
55 56 57 |
# File 'lib/gherkin_ruby/ast.rb', line 55 def name @name end |
#steps ⇒ Object (readonly)
Returns the value of attribute steps.
55 56 57 |
# File 'lib/gherkin_ruby/ast.rb', line 55 def steps @steps end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
55 56 57 |
# File 'lib/gherkin_ruby/ast.rb', line 55 def @tags end |
Instance Method Details
#each ⇒ Object
69 70 71 |
# File 'lib/gherkin_ruby/ast.rb', line 69 def each @steps.each end |
#line ⇒ Object
65 66 67 |
# File 'lib/gherkin_ruby/ast.rb', line 65 def line @steps.first.line - 1 if @steps.any? end |