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_predicate, #to_s, #type, #variable?
Constructor Details
#initialize(left, middle, right) ⇒ Ternary
Returns a new instance of Ternary.
120 121 122 123 124 |
# File 'lib/predicator/ast.rb', line 120 def initialize left, middle, right super left @middle = middle @right = right end |
Instance Attribute Details
#middle ⇒ Object
Returns the value of attribute middle.
118 119 120 |
# File 'lib/predicator/ast.rb', line 118 def middle @middle end |
#right ⇒ Object
Returns the value of attribute right.
118 119 120 |
# File 'lib/predicator/ast.rb', line 118 def right @right end |
Instance Method Details
#children ⇒ Object
126 |
# File 'lib/predicator/ast.rb', line 126 def children; [left, middle, right] end |