2017-02-13 13:58:58 -05:00
|
|
|
# frozen_string_literal: true
|
2018-02-24 01:45:50 -05:00
|
|
|
|
2018-02-24 02:41:47 -05:00
|
|
|
module Arel # :nodoc: all
|
2011-01-29 01:40:39 -05:00
|
|
|
module Math
|
|
|
|
def *(other)
|
|
|
|
Arel::Nodes::Multiplication.new(self, other)
|
|
|
|
end
|
|
|
|
|
|
|
|
def +(other)
|
2011-03-08 13:27:43 -05:00
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::Addition.new(self, other))
|
2011-01-29 01:40:39 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def -(other)
|
2011-03-08 13:27:43 -05:00
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::Subtraction.new(self, other))
|
2011-01-29 01:40:39 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def /(other)
|
|
|
|
Arel::Nodes::Division.new(self, other)
|
|
|
|
end
|
2015-12-10 16:50:28 -05:00
|
|
|
|
|
|
|
def &(other)
|
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseAnd.new(self, other))
|
|
|
|
end
|
|
|
|
|
|
|
|
def |(other)
|
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseOr.new(self, other))
|
|
|
|
end
|
|
|
|
|
|
|
|
def ^(other)
|
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseXor.new(self, other))
|
|
|
|
end
|
|
|
|
|
|
|
|
def <<(other)
|
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseShiftLeft.new(self, other))
|
|
|
|
end
|
|
|
|
|
|
|
|
def >>(other)
|
|
|
|
Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseShiftRight.new(self, other))
|
|
|
|
end
|
|
|
|
|
|
|
|
def ~@
|
|
|
|
Arel::Nodes::BitwiseNot.new(self)
|
|
|
|
end
|
2011-01-29 01:40:39 -05:00
|
|
|
end
|
2011-03-07 11:35:48 -05:00
|
|
|
end
|