Class: Gherkin::AST::Scenario

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(name, steps = [], tags = []) ⇒ Scenario

Returns a new instance of Scenario.



52
53
54
55
56
57
58
# File 'lib/gherkin/ast.rb', line 52

def initialize(name, steps=[], tags=[])
  @line, @column = name.line_and_column

  @name  = name.to_s
  @steps = steps
  @tags  = tags
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



48
49
50
# File 'lib/gherkin/ast.rb', line 48

def name
  @name
end

#stepsObject (readonly)

Returns the value of attribute steps.



48
49
50
# File 'lib/gherkin/ast.rb', line 48

def steps
  @steps
end

#tagsObject (readonly)

Returns the value of attribute tags.



48
49
50
# File 'lib/gherkin/ast.rb', line 48

def tags
  @tags
end

Instance Method Details

#eachObject



60
61
62
# File 'lib/gherkin/ast.rb', line 60

def each
  @steps.each
end