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.



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

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

#descriptionObject

Returns the value of attribute description.



19
20
21
# File 'lib/gherkin/ast.rb', line 19

def description
  @description
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



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

def each
  @scenarios.each
end