Class: Vertigo::CondExpr

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(whens = [], else_ = nil) ⇒ CondExpr

Returns a new instance of CondExpr.



470
471
472
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 470

def initialize whens=[],else_=nil
  @whens,@else_=whens,else_
end

Instance Attribute Details

#else_Object

Returns the value of attribute else_.



469
470
471
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 469

def else_
  @else_
end

#whensObject

Returns the value of attribute whens.



469
470
471
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 469

def whens
  @whens
end