Class: Gherkin::AST::Feature

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

Instance Attribute Summary collapse

Attributes inherited from Node

#filename, #line

Instance Method Summary collapse

Methods inherited from Node

#accept, #pos

Constructor Details

#initialize(name, scenarios = [], tags = [], background = nil) ⇒ Feature

Returns a new instance of Feature.



22
23
24
25
26
27
# File 'lib/gherkin/ast.rb', line 22

def initialize(name, scenarios=[], tags=[], background=nil)
  @name       = name
  @background = background
  @tags       = tags
  @scenarios  = scenarios
end

Instance Attribute Details

#backgroundObject

Returns the value of attribute background.



17
18
19
# File 'lib/gherkin/ast.rb', line 17

def background
  @background
end

#nameObject (readonly)

Returns the value of attribute name.



17
18
19
# File 'lib/gherkin/ast.rb', line 17

def name
  @name
end

#scenariosObject

Returns the value of attribute scenarios.



17
18
19
# File 'lib/gherkin/ast.rb', line 17

def scenarios
  @scenarios
end

#tagsObject

Returns the value of attribute tags.



17
18
19
# File 'lib/gherkin/ast.rb', line 17

def tags
  @tags
end

Instance Method Details

#eachObject



29
30
31
# File 'lib/gherkin/ast.rb', line 29

def each
  @scenarios.each
end