Class: Predicator::AST::Ternary
Direct Known Subclasses
Instance Attribute Summary collapse
-
#middle ⇒ Object
Returns the value of attribute middle.
-
#right ⇒ Object
Returns the value of attribute right.
Attributes inherited from Node
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(left, middle, right) ⇒ Ternary
constructor
A new instance of Ternary.
Methods inherited from Node
#each, #literal?, #to_dot, #to_instructions, #to_s, #type, #variable?
Constructor Details
#initialize(left, middle, right) ⇒ Ternary
Returns a new instance of Ternary.
168 169 170 171 172 |
# File 'lib/predicator/ast.rb', line 168 def initialize left, middle, right super left @middle = middle @right = right end |
Instance Attribute Details
#middle ⇒ Object
Returns the value of attribute middle.
166 167 168 |
# File 'lib/predicator/ast.rb', line 166 def middle @middle end |
#right ⇒ Object
Returns the value of attribute right.
166 167 168 |
# File 'lib/predicator/ast.rb', line 166 def right @right end |
Instance Method Details
#children ⇒ Object
174 |
# File 'lib/predicator/ast.rb', line 174 def children; [left, middle, right] end |