Class: RubyRTL::Case

Inherits:
Ast
  • Object
show all
Defined in:
lib/ruby_rtl/ast.rb

Overview

case / switch

Instance Attribute Summary collapse

Attributes inherited from Ast

#comments

Instance Method Summary collapse

Methods inherited from Ast

#accept

Constructor Details

#initialize(condition, body = nil) ⇒ Case

Returns a new instance of Case.



171
172
173
# File 'lib/ruby_rtl/ast.rb', line 171

def initialize condition,body=nil
  @cond,@body=condition,body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



170
171
172
# File 'lib/ruby_rtl/ast.rb', line 170

def body
  @body
end

#condObject

Returns the value of attribute cond.



170
171
172
# File 'lib/ruby_rtl/ast.rb', line 170

def cond
  @cond
end