Sha256: 0a2aac4482a7a6afc2789d8d647ea339bbbdc27cf3f3c09b3d68c25410e976a8
Contents?: true
Size: 670 Bytes
Versions: 15
Compression:
Stored size: 670 Bytes
Contents
module Quantify module Unit class NonSI < Base # Class representing SI units. This inherits from Unit::Base # Additional initialize. Some NonSI units - temperature units, celsius and # farenheit - contain scaling factors in addition to multiplicative factors. # These are required in order to perform conversion, e.g. kelvin => celsius # and therefore become and additional attribute to NonSI units # def initialize(options=nil) @scaling = 0.0 if options.is_a?(Hash) && options[:scaling] @scaling = options.delete(:scaling).to_f end super(options) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems