Class: MilkTea::AST::IfExpr
- Inherits:
-
Data
- Object
- Data
- MilkTea::AST::IfExpr
- Defined in:
- lib/milk_tea/core/ast.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#else_expression ⇒ Object
readonly
Returns the value of attribute else_expression.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#then_expression ⇒ Object
readonly
Returns the value of attribute then_expression.
Instance Method Summary collapse
-
#initialize(condition:, then_expression:, else_expression:, line: nil, column: nil) ⇒ IfExpr
constructor
A new instance of IfExpr.
Constructor Details
#initialize(condition:, then_expression:, else_expression:, line: nil, column: nil) ⇒ IfExpr
Returns a new instance of IfExpr.
262 |
# File 'lib/milk_tea/core/ast.rb', line 262 def initialize(condition:, then_expression:, else_expression:, line: nil, column: nil) = super |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column
261 262 263 |
# File 'lib/milk_tea/core/ast.rb', line 261 def column @column end |
#condition ⇒ Object (readonly)
Returns the value of attribute condition
261 262 263 |
# File 'lib/milk_tea/core/ast.rb', line 261 def condition @condition end |
#else_expression ⇒ Object (readonly)
Returns the value of attribute else_expression
261 262 263 |
# File 'lib/milk_tea/core/ast.rb', line 261 def else_expression @else_expression end |
#line ⇒ Object (readonly)
Returns the value of attribute line
261 262 263 |
# File 'lib/milk_tea/core/ast.rb', line 261 def line @line end |
#then_expression ⇒ Object (readonly)
Returns the value of attribute then_expression
261 262 263 |
# File 'lib/milk_tea/core/ast.rb', line 261 def then_expression @then_expression end |