Class: ImgToScript::AbstractToken::IfCondition
- Inherits:
-
ImgToScript::AbstractToken
- Object
- ImgToScript::AbstractToken
- ImgToScript::AbstractToken::IfCondition
- Defined in:
- lib/img_to_script/abstract_token/if_condition.rb
Overview
If condition.
Instance Attribute Summary collapse
-
#consequent ⇒ Object
readonly
Returns the value of attribute consequent.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
-
#initialize(expression:, consequent:) ⇒ IfCondition
constructor
A new instance of IfCondition.
Constructor Details
#initialize(expression:, consequent:) ⇒ IfCondition
Returns a new instance of IfCondition.
11 12 13 14 15 16 17 |
# File 'lib/img_to_script/abstract_token/if_condition.rb', line 11 def initialize(expression:, consequent:, **) @type = AbsTokenType::IF_CONDITION @expression = expression @consequent = consequent super end |
Instance Attribute Details
#consequent ⇒ Object (readonly)
Returns the value of attribute consequent.
9 10 11 |
# File 'lib/img_to_script/abstract_token/if_condition.rb', line 9 def consequent @consequent end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
9 10 11 |
# File 'lib/img_to_script/abstract_token/if_condition.rb', line 9 def expression @expression end |