Class: RLSL::Prism::IR::IfStatement
- Defined in:
- lib/rlsl/prism/ir/control_flow.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#else_branch ⇒ Object
readonly
Returns the value of attribute else_branch.
-
#then_branch ⇒ Object
readonly
Returns the value of attribute then_branch.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(condition, then_branch, else_branch = nil, type = nil) ⇒ IfStatement
constructor
A new instance of IfStatement.
Methods inherited from Node
Constructor Details
#initialize(condition, then_branch, else_branch = nil, type = nil) ⇒ IfStatement
Returns a new instance of IfStatement.
11 12 13 14 15 16 17 |
# File 'lib/rlsl/prism/ir/control_flow.rb', line 11 def initialize(condition, then_branch, else_branch = nil, type = nil) super() @condition = condition @then_branch = then_branch @else_branch = else_branch @type = type end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
7 8 9 |
# File 'lib/rlsl/prism/ir/control_flow.rb', line 7 def condition @condition end |
#else_branch ⇒ Object (readonly)
Returns the value of attribute else_branch.
7 8 9 |
# File 'lib/rlsl/prism/ir/control_flow.rb', line 7 def else_branch @else_branch end |
#then_branch ⇒ Object (readonly)
Returns the value of attribute then_branch.
7 8 9 |
# File 'lib/rlsl/prism/ir/control_flow.rb', line 7 def then_branch @then_branch end |