Class: Vertigo::If

Inherits:
AstNode show all
Defined in:
lib/vertigo/ast_vertigo_rkgen.rb

Instance Attribute Summary collapse

Attributes inherited from AstNode

#label, #pos

Instance Method Summary collapse

Methods inherited from AstNode

#accept, #str

Constructor Details

#initialize(cond = nil, body = nil, elsifs = [], else_ = nil) ⇒ If

Returns a new instance of If.



232
233
234
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 232

def initialize cond=nil,body=nil,elsifs=[],else_=nil
  @cond,@body,@elsifs,@else_=cond,body,elsifs,else_
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



231
232
233
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 231

def body
  @body
end

#condObject

Returns the value of attribute cond.



231
232
233
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 231

def cond
  @cond
end

#else_Object

Returns the value of attribute else_.



231
232
233
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 231

def else_
  @else_
end

#elsifsObject

Returns the value of attribute elsifs.



231
232
233
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 231

def elsifs
  @elsifs
end