Sha256: cd372b16e4d0ae2da09e29824386284810faac6e2c2dbedcbf3f83366858bc0c
Contents?: true
Size: 887 Bytes
Versions: 17
Compression:
Stored size: 887 Bytes
Contents
module Picky module Wrappers module Bundle # A calculation rewrites the symbol into a float. # # Note: A calculation will try to find a float in the index, # not a sym. # # TODO I really need to allow integers as keys. # The code below is just not up to the needed quality. # Use key_format :to_i? # class Calculation < Wrapper # API. # # By default, a calculation does not # calculate anything. # def calculate float float end # TODO Symbols. Use a block here? # def ids float_str @bundle.ids calculate(float_str.to_f).to_s end # TODO Symbols. # def weight float_str @bundle.weight calculate(float_str.to_f).to_s end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems