Class: XRay::JS::ConditionExpression
- Inherits:
-
Expression
- Object
- Element
- Expression
- XRay::JS::ConditionExpression
- Defined in:
- lib/js/struct.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(condition, left, right) ⇒ ConditionExpression
constructor
A new instance of ConditionExpression.
- #text ⇒ Object
Methods inherited from Expression
Methods inherited from Element
Constructor Details
#initialize(condition, left, right) ⇒ ConditionExpression
Returns a new instance of ConditionExpression.
225 226 227 228 |
# File 'lib/js/struct.rb', line 225 def initialize(condition, left, right) super '?:', left, right, condition.position @condition = condition end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
223 224 225 |
# File 'lib/js/struct.rb', line 223 def condition @condition end |
Instance Method Details
#text ⇒ Object
230 231 232 |
# File 'lib/js/struct.rb', line 230 def text "(#{type},#{condition},#{left},#{right})" end |