Sha256: cdc0bda51e4f9731bcb8f907be1b65ee4c806b0786a69adec7050c29c3aa4f71

Contents?: true

Size: 1001 Bytes

Versions: 160

Compression:

Stored size: 1001 Bytes

Contents

# frozen_string_literal: true

module Arel # :nodoc: all
  module Math
    def *(other)
      Arel::Nodes::Multiplication.new(self, other)
    end

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

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

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

    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
  end
end

Version data entries

160 entries across 155 versions & 14 rubygems

Version Path
activerecord-6.1.7.6 lib/arel/math.rb
activerecord-7.0.7.1 lib/arel/math.rb
activerecord-6.1.7.5 lib/arel/math.rb
activerecord-7.0.7 lib/arel/math.rb
activerecord-7.0.6 lib/arel/math.rb
activerecord-7.0.5.1 lib/arel/math.rb
activerecord-6.1.7.4 lib/arel/math.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-7.0.3.1/lib/arel/math.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/arel/math.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activerecord-7.0.2.3/lib/arel/math.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb
activerecord-7.0.5 lib/arel/math.rb
activerecord-7.0.4.3 lib/arel/math.rb
activerecord-6.1.7.3 lib/arel/math.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb
activerecord-6.1.7.2 lib/arel/math.rb
activerecord-7.0.4.2 lib/arel/math.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/math.rb
activerecord-7.0.4.1 lib/arel/math.rb
activerecord-6.1.7.1 lib/arel/math.rb