Class: Squeel::Nodes::Operation

Inherits:
Function
  • Object
show all
Defined in:
lib/squeel/nodes/operation.rb

Instance Attribute Summary

Attributes inherited from Function

#alias, #args, #name

Instance Method Summary collapse

Methods inherited from Function

#<, #<<, #<=, #==, #=~, #>, #>=, #>>, #^, #as, #asc, #desc, #to_sym

Methods included from Operators

#*, #+, #-, #/, #op

Methods included from PredicateMethods

included

Constructor Details

#initialize(left, operator, right) ⇒ Operation

Returns a new instance of Operation.



7
8
9
# File 'lib/squeel/nodes/operation.rb', line 7

def initialize(left, operator, right)
  super(operator, [left, right])
end

Instance Method Details

#leftObject



13
14
15
# File 'lib/squeel/nodes/operation.rb', line 13

def left
  args[0]
end

#rightObject



17
18
19
# File 'lib/squeel/nodes/operation.rb', line 17

def right
  args[1]
end