Class: Gherkin::AST::Background

Inherits:
Node
  • Object
show all
Includes:
Enumerable
Defined in:
lib/gherkin/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(steps = []) ⇒ Background

Returns a new instance of Background.



35
36
37
38
39
40
# File 'lib/gherkin/ast.rb', line 35

def initialize(steps=[])
  @line   = steps.first.line - 1
  @column = 3

  @steps = steps
end

Instance Attribute Details

#stepsObject (readonly)

Returns the value of attribute steps.



31
32
33
# File 'lib/gherkin/ast.rb', line 31

def steps
  @steps
end

Instance Method Details

#eachObject



42
43
44
# File 'lib/gherkin/ast.rb', line 42

def each
  @steps.each
end