Class: RKelly::Nodes::ForNode

Inherits:
Node
  • Object
show all
Defined in:
lib/rkelly/nodes/for_node.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#comments, #filename, #line, #value

Instance Method Summary collapse

Methods inherited from Node

#==, #===, #each, #pointcut, #to_dots, #to_ecma, #to_real_sexp, #to_sexp

Methods included from Visitable

#accept

Constructor Details

#initialize(init, test, counter, body) ⇒ ForNode

Returns a new instance of ForNode.



5
6
7
8
9
10
# File 'lib/rkelly/nodes/for_node.rb', line 5

def initialize(init, test, counter, body)
  super(body)
  @init = init
  @test = test
  @counter = counter
end

Instance Attribute Details

#counterObject (readonly)

Returns the value of attribute counter.



4
5
6
# File 'lib/rkelly/nodes/for_node.rb', line 4

def counter
  @counter
end

#initObject (readonly)

Returns the value of attribute init.



4
5
6
# File 'lib/rkelly/nodes/for_node.rb', line 4

def init
  @init
end

#testObject (readonly)

Returns the value of attribute test.



4
5
6
# File 'lib/rkelly/nodes/for_node.rb', line 4

def test
  @test
end