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.
300 301 302 303 |
# File 'lib/crokus/ast.rb', line 300 def initialize expr,cases=[],default=nil @expr,@cases=expr,cases @default=nil end |
Instance Attribute Details
#cases ⇒ Object
Returns the value of attribute cases.
299 300 301 |
# File 'lib/crokus/ast.rb', line 299 def cases @cases end |
#default ⇒ Object
Returns the value of attribute default.
299 300 301 |
# File 'lib/crokus/ast.rb', line 299 def default @default end |
#expr ⇒ Object
Returns the value of attribute expr.
299 300 301 |
# File 'lib/crokus/ast.rb', line 299 def expr @expr end |