Class: Johnson::Nodes::For

Inherits:
Node
  • Object
show all
Defined in:
lib/johnson/nodes/for.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line, #value

Instance Method Summary collapse

Methods inherited from Node

#each, #to_dot, #to_ecma, #to_s, #to_sexp

Methods included from Visitable

#accept

Constructor Details

#initialize(line, column, init, cond, update, body) ⇒ For

Returns a new instance of For.



6
7
8
9
10
11
# File 'lib/johnson/nodes/for.rb', line 6

def initialize(line, column, init, cond, update, body)
  super(line, column, body)
  @init   = init
  @cond   = cond
  @update = update
end

Instance Attribute Details

#condObject

Returns the value of attribute cond.



5
6
7
# File 'lib/johnson/nodes/for.rb', line 5

def cond
  @cond
end

#initObject

Returns the value of attribute init.



5
6
7
# File 'lib/johnson/nodes/for.rb', line 5

def init
  @init
end

#updateObject

Returns the value of attribute update.



5
6
7
# File 'lib/johnson/nodes/for.rb', line 5

def update
  @update
end