Class: Vertigo::When

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(expr = nil, cond = nil) ⇒ When

Returns a new instance of When.



477
478
479
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 477

def initialize expr=nil,cond=nil
  @expr,@cond=expr,cond
end

Instance Attribute Details

#condObject

Returns the value of attribute cond.



476
477
478
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 476

def cond
  @cond
end

#exprObject

Returns the value of attribute expr.



476
477
478
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 476

def expr
  @expr
end