Class: Crokus::For

Inherits:
CtrlStmt show all
Defined in:
lib/crokus/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ast

#accept, #str

Constructor Details

#initialize(init = [], cond = nil, increment = nil, body = nil) ⇒ For

Returns a new instance of For.



265
266
267
# File 'lib/crokus/ast.rb', line 265

def initialize init=[],cond=nil,increment=nil,body=nil
  @init,@cond,@increment,@body=init,cond,increment,body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



264
265
266
# File 'lib/crokus/ast.rb', line 264

def body
  @body
end

#condObject

Returns the value of attribute cond.



264
265
266
# File 'lib/crokus/ast.rb', line 264

def cond
  @cond
end

#incrementObject

Returns the value of attribute increment.



264
265
266
# File 'lib/crokus/ast.rb', line 264

def increment
  @increment
end

#initObject

Returns the value of attribute init.



264
265
266
# File 'lib/crokus/ast.rb', line 264

def init
  @init
end