Sha256: 323746e8fcb315e558da528e349bee5e5e5369c6a34822c681bc11cbce47b5ac
Contents?: true
Size: 670 Bytes
Versions: 1
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 and options[:scaling] @scaling = options.delete(:scaling).to_f end super(options) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quantify-1.0.5 | lib/quantify/unit/non_si_unit.rb |