Class: Natsuzora::AST::IfBlock
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#else_nodes ⇒ Object
readonly
Returns the value of attribute else_nodes.
-
#then_nodes ⇒ Object
readonly
Returns the value of attribute then_nodes.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(condition:, then_nodes:, else_nodes: nil) ⇒ IfBlock
constructor
A new instance of IfBlock.
Constructor Details
#initialize(condition:, then_nodes:, else_nodes: nil) ⇒ IfBlock
Returns a new instance of IfBlock.
46 47 48 49 50 51 |
# File 'lib/natsuzora/ast.rb', line 46 def initialize(condition:, then_nodes:, else_nodes: nil, **) super(**) @condition = condition @then_nodes = then_nodes @else_nodes = else_nodes end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
44 45 46 |
# File 'lib/natsuzora/ast.rb', line 44 def condition @condition end |
#else_nodes ⇒ Object (readonly)
Returns the value of attribute else_nodes.
44 45 46 |
# File 'lib/natsuzora/ast.rb', line 44 def else_nodes @else_nodes end |
#then_nodes ⇒ Object (readonly)
Returns the value of attribute then_nodes.
44 45 46 |
# File 'lib/natsuzora/ast.rb', line 44 def then_nodes @then_nodes end |