Module: Arel::Math

Included in:
Attributes::Attribute, Nodes::InfixOperation, Nodes::NodeExpression
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



21
22
23
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 21

def &(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseAnd.new(self, other))
end

#*(other) ⇒ Object



5
6
7
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 5

def *(other)
  Arel::Nodes::Multiplication.new(self, other)
end

#+(other) ⇒ Object



9
10
11
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 9

def +(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::Addition.new(self, other))
end

#-(other) ⇒ Object



13
14
15
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 13

def -(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::Subtraction.new(self, other))
end

#/(other) ⇒ Object



17
18
19
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 17

def /(other)
  Arel::Nodes::Division.new(self, other)
end

#<<(other) ⇒ Object



33
34
35
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 33

def <<(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseShiftLeft.new(self, other))
end

#>>(other) ⇒ Object



37
38
39
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 37

def >>(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseShiftRight.new(self, other))
end

#^(other) ⇒ Object



29
30
31
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 29

def ^(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseXor.new(self, other))
end

#|(other) ⇒ Object



25
26
27
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 25

def |(other)
  Arel::Nodes::Grouping.new(Arel::Nodes::BitwiseOr.new(self, other))
end

#~@Object



41
42
43
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb', line 41

def ~@
  Arel::Nodes::BitwiseNot.new(self)
end