Sha256: 88d0f28bc43df4e84206108e04b86cada0f2b3a4601cf45e6c7f58b494870345

Contents?: true

Size: 327 Bytes

Versions: 3

Compression:

Stored size: 327 Bytes

Contents

module Dydx
  module Algebra
    module Operator
      module Parts
        module Interface
          %w(+ - * / ^).each do |operator|
            define_method(operator) do |x|
              x = ::Set::Num.new(x) if x.is_a?(Fixnum)
              super(x)
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dydx-0.0.4 lib/dydx/algebra/operator/parts/interface.rb
dydx-0.0.3 lib/dydx/algebra/operator/parts/interface.rb
dydx-0.0.2 lib/dydx/algebra/operator/parts/interface.rb