Class: LucidTDL::AST::Background

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

Instance Attribute Summary collapse

Attributes inherited from Node

#filename

Instance Method Summary collapse

Methods inherited from Node

#accept, #pos

Constructor Details

#initialize(steps = []) ⇒ Background

Returns a new instance of Background.



47
48
49
# File 'lib/lucid-tdl/ast.rb', line 47

def initialize(steps=[])
  @steps = steps
end

Instance Attribute Details

#stepsObject

Returns the value of attribute steps.



45
46
47
# File 'lib/lucid-tdl/ast.rb', line 45

def steps
  @steps
end

Instance Method Details

#eachObject



55
56
57
# File 'lib/lucid-tdl/ast.rb', line 55

def each
  @steps.each
end

#lineObject



51
52
53
# File 'lib/lucid-tdl/ast.rb', line 51

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