Class: RLSL::Prism::IR::Ternary
- Defined in:
- lib/rlsl/prism/ir/expressions.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#else_expr ⇒ Object
readonly
Returns the value of attribute else_expr.
-
#then_expr ⇒ Object
readonly
Returns the value of attribute then_expr.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(condition, then_expr, else_expr, type = nil) ⇒ Ternary
constructor
A new instance of Ternary.
Methods inherited from Node
Constructor Details
#initialize(condition, then_expr, else_expr, type = nil) ⇒ Ternary
Returns a new instance of Ternary.
138 139 140 141 142 143 144 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 138 def initialize(condition, then_expr, else_expr, type = nil) super() @condition = condition @then_expr = then_expr @else_expr = else_expr @type = type end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
134 135 136 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 134 def condition @condition end |
#else_expr ⇒ Object (readonly)
Returns the value of attribute else_expr.
134 135 136 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 134 def else_expr @else_expr end |
#then_expr ⇒ Object (readonly)
Returns the value of attribute then_expr.
134 135 136 |
# File 'lib/rlsl/prism/ir/expressions.rb', line 134 def then_expr @then_expr end |