Class: GherkinRuby::AST::Background
- Includes:
- Enumerable
- Defined in:
- lib/gherkin_ruby/ast.rb
Instance Attribute Summary collapse
-
#steps ⇒ Object
Returns the value of attribute steps.
Attributes inherited from Node
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(steps = []) ⇒ Background
constructor
A new instance of Background.
- #line ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(steps = []) ⇒ Background
Returns a new instance of Background.
41 42 43 |
# File 'lib/gherkin_ruby/ast.rb', line 41 def initialize(steps=[]) @steps = steps end |
Instance Attribute Details
#steps ⇒ Object
Returns the value of attribute steps.
36 37 38 |
# File 'lib/gherkin_ruby/ast.rb', line 36 def steps @steps end |
Instance Method Details
#each ⇒ Object
49 50 51 |
# File 'lib/gherkin_ruby/ast.rb', line 49 def each @steps.each end |
#line ⇒ Object
45 46 47 |
# File 'lib/gherkin_ruby/ast.rb', line 45 def line @steps.first.line - 1 if @steps.any? end |