Class: Faust2Ruby::AST::CaseBranch
Overview
A single branch in a case expression
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(pattern, result, **opts) ⇒ CaseBranch
constructor
A new instance of CaseBranch.
Constructor Details
#initialize(pattern, result, **opts) ⇒ CaseBranch
Returns a new instance of CaseBranch.
308 309 310 311 312 |
# File 'lib/faust2ruby/ast.rb', line 308 def initialize(pattern, result, **opts) super(**opts) @pattern = pattern # Can be IntLiteral, Identifier (variable), or Paren @result = result end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
306 307 308 |
# File 'lib/faust2ruby/ast.rb', line 306 def pattern @pattern end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
306 307 308 |
# File 'lib/faust2ruby/ast.rb', line 306 def result @result end |