Class: Crokus::Switch
Instance Attribute Summary collapse
-
#cases ⇒ Object
Returns the value of attribute cases.
-
#default ⇒ Object
Returns the value of attribute default.
-
#expr ⇒ Object
Returns the value of attribute expr.
Instance Method Summary collapse
-
#initialize(expr, cases = [], default = nil) ⇒ Switch
constructor
A new instance of Switch.
Methods inherited from Ast
Constructor Details
#initialize(expr, cases = [], default = nil) ⇒ Switch
Returns a new instance of Switch.
304 305 306 307 |
# File 'lib/crokus/ast.rb', line 304 def initialize expr,cases=[],default=nil @expr,@cases=expr,cases @default=nil end |
Instance Attribute Details
#cases ⇒ Object
Returns the value of attribute cases.
303 304 305 |
# File 'lib/crokus/ast.rb', line 303 def cases @cases end |
#default ⇒ Object
Returns the value of attribute default.
303 304 305 |
# File 'lib/crokus/ast.rb', line 303 def default @default end |
#expr ⇒ Object
Returns the value of attribute expr.
303 304 305 |
# File 'lib/crokus/ast.rb', line 303 def expr @expr end |