Sha256: 8f7df885c88eb37bfe886c8b5c48db17f56c8c96c1cb1c7cd90ddfdfe71378b7

Contents?: true

Size: 491 Bytes

Versions: 14

Compression:

Stored size: 491 Bytes

Contents

module Danica
  module BaseOperations
    def +(other)
      return other + self if other.is_a?(Operator::Addition)
      addition(self, other)
    end

    def *(other)
      return other * self if other.is_a?(Operator::Multiplication)
      multiplication(self, other)
    end

    def /(other)
      division(self, other)
    end

    def -(other)
      self + negative(other)
    end

    def **(other)
      power(self, other)
    end

    def -@
      negative(self)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
danica-2.7.1 lib/danica/base_operations.rb
danica-2.6.4 lib/danica/base_operations.rb
danica-2.6.3 lib/danica/base_operations.rb
danica-2.6.2 lib/danica/base_operations.rb
danica-2.6.1 lib/danica/base_operations.rb
danica-2.6.0 lib/danica/base_operations.rb
danica-2.5.1 lib/danica/base_operations.rb
danica-2.5.0 lib/danica/base_operations.rb
danica-2.4.4 lib/danica/base_operations.rb
danica-2.4.3 lib/danica/base_operations.rb
danica-2.4.2 lib/danica/base_operations.rb
danica-2.4.1 lib/danica/base_operations.rb
danica-2.4.0 lib/danica/base_operations.rb
danica-2.3.1 lib/danica/base_operations.rb