Module: Squeel::Nodes::Operators
Overview
Module containing Operation factory methods for inclusion in Squeel nodes
Instance Method Summary collapse
-
#*(value) ⇒ Operation
Factory for a new multiplication operation with this node as its left operand.
-
#+(value) ⇒ Operation
Factory for a new addition operation with this node as its left operand.
-
#-(value) ⇒ Operation
Factory for a new subtraction operation with this node as its left operand.
-
#/(value) ⇒ Operation
Factory for a new division operation with this node as its left operand.
-
#op(operator, value) ⇒ Operation
Factory for a new custom operation with this node as its left operand.
Instance Method Details
#*(value) ⇒ Operation
Factory for a new multiplication operation with this node as its left operand.
23 24 25 |
# File 'lib/squeel/nodes/operators.rb', line 23 def *(value) Operation.new(self, :*, value) end |
#+(value) ⇒ Operation
Factory for a new addition operation with this node as its left operand.
9 10 11 |
# File 'lib/squeel/nodes/operators.rb', line 9 def +(value) Operation.new(self, :+, value) end |
#-(value) ⇒ Operation
Factory for a new subtraction operation with this node as its left operand.
16 17 18 |
# File 'lib/squeel/nodes/operators.rb', line 16 def -(value) Operation.new(self, :-, value) end |