Module: Ducktape::Expression::BinaryOpExp
- Included in:
- IndexerExp, PropertyExp, QualifiedExp
- Defined in:
- lib/ducktape/expression/binary_op_exp.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
- #bind(src, type, qual = nil, root = src) ⇒ Object
- #initialize(left, right) ⇒ Object
- #rightmost ⇒ Object
- #unbind ⇒ Object
- #unparse ⇒ Object
- #value ⇒ Object
- #value=(v) ⇒ Object
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
4 5 6 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 4 def left @left end |
#owner ⇒ Object
Returns the value of attribute owner.
5 6 7 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 5 def owner @owner end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
4 5 6 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 4 def right @right end |
Instance Method Details
#bind(src, type, qual = nil, root = src) ⇒ Object
15 16 17 18 19 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 15 def bind(src, type, qual = nil, root = src) unbind lsrc = left.bind(src, :path, qual, root) right.bind(lsrc, type, self.class, root) end |
#initialize(left, right) ⇒ Object
7 8 9 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 7 def initialize(left, right) @left, @right = left, right end |
#rightmost ⇒ Object
27 28 29 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 27 def rightmost @right.rightmost end |
#unbind ⇒ Object
21 22 23 24 25 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 21 def unbind left.unbind right.unbind nil end |
#unparse ⇒ Object
31 32 33 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 31 def unparse "#{left.unparse}#{self.class.instance_variable_get(:@op)}#{right.unparse}" end |
#value ⇒ Object
35 36 37 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 35 def value right.value end |
#value=(v) ⇒ Object
39 40 41 |
# File 'lib/ducktape/expression/binary_op_exp.rb', line 39 def value=(v) right.value = v end |