Sha256: cdc0bda51e4f9731bcb8f907be1b65ee4c806b0786a69adec7050c29c3aa4f71

Contents?: true

Size: 1001 Bytes

Versions: 159

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

159 entries across 154 versions & 13 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.4/lib/arel/math.rb
activerecord-8.0.1 lib/arel/math.rb
activerecord-8.0.0.1 lib/arel/math.rb
activerecord-7.2.2.1 lib/arel/math.rb
activerecord-7.1.5.1 lib/arel/math.rb
activerecord-7.0.8.7 lib/arel/math.rb
activerecord-8.0.0 lib/arel/math.rb
activerecord-7.2.2 lib/arel/math.rb
activerecord-7.1.5 lib/arel/math.rb
activerecord-8.0.0.rc2 lib/arel/math.rb
activerecord-7.2.1.2 lib/arel/math.rb
activerecord-7.1.4.2 lib/arel/math.rb
activerecord-7.0.8.6 lib/arel/math.rb
activerecord-6.1.7.10 lib/arel/math.rb
activerecord-8.0.0.rc1 lib/arel/math.rb
activerecord-6.1.7.9 lib/arel/math.rb
activerecord-7.2.1.1 lib/arel/math.rb
activerecord-7.1.4.1 lib/arel/math.rb
activerecord-7.0.8.5 lib/arel/math.rb
activerecord-8.0.0.beta1 lib/arel/math.rb