Sha256: 997da2246b0a340d32d22b5c2a4bee38f01f5152fd17b966f35e4ebafbdbc3f2

Contents?: true

Size: 684 Bytes

Versions: 10

Compression:

Stored size: 684 Bytes

Contents

module Internals
  module Indexed
    module Wrappers

      module Bundle

        # A calculation rewrites the symbol into a float.
        #
        # TODO I really need to allow integers as keys. The code below is just not up to the needed quality.
        #
        class Calculation < Wrapper

          #
          #
          def recalculate float
            float
          end

          #
          #
          def ids sym
            @bundle.ids recalculate(sym.to_s.to_f).to_s.to_sym
          end

          #
          #
          def weight sym
            @bundle.weight recalculate(sym.to_s.to_f).to_s.to_sym
          end

        end

      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
picky-2.5.2 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.5.1 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.5.0 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.4.3 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.4.2 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.4.1 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.4.0 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.3.0 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.2.1 lib/picky/internals/indexed/wrappers/bundle/calculation.rb
picky-2.2.0 lib/picky/internals/indexed/wrappers/bundle/calculation.rb