Sha256: 943407438875e8a5f9694f8441e5dcbf69464512eaa5c62098a3142fab472d7f

Contents?: true

Size: 956 Bytes

Versions: 14

Compression:

Stored size: 956 Bytes

Contents

module Arel
  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

14 entries across 14 versions & 4 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/math.rb
abaci-0.3.0 vendor/bundle/gems/arel-7.1.0/lib/arel/math.rb
arel-7.1.4 lib/arel/math.rb
arel-7.1.3 lib/arel/math.rb
arel-7.1.2 lib/arel/math.rb
arel-7.1.1 lib/arel/math.rb
arel-7.1.0 lib/arel/math.rb