Class: LucidTDL::AST::Scenario

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

Overview

class Background

Direct Known Subclasses

Test

Instance Attribute Summary collapse

Attributes inherited from Node

#filename

Instance Method Summary collapse

Methods inherited from Node

#accept, #pos

Constructor Details

#initialize(name, steps = [], tags = []) ⇒ Scenario

Returns a new instance of Scenario.



65
66
67
68
69
# File 'lib/lucid-tdl/ast.rb', line 65

def initialize(name, steps=[], tags=[])
  @name = name.to_s
  @steps = steps
  @tags = tags
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



63
64
65
# File 'lib/lucid-tdl/ast.rb', line 63

def name
  @name
end

#stepsObject (readonly)

Returns the value of attribute steps.



63
64
65
# File 'lib/lucid-tdl/ast.rb', line 63

def steps
  @steps
end

#tagsObject (readonly)

Returns the value of attribute tags.



63
64
65
# File 'lib/lucid-tdl/ast.rb', line 63

def tags
  @tags
end

Instance Method Details

#eachObject



75
76
77
# File 'lib/lucid-tdl/ast.rb', line 75

def each
  @steps.each
end

#lineObject



71
72
73
# File 'lib/lucid-tdl/ast.rb', line 71

def line
  @steps.first.line - 1 if @steps.any?
end