Sha256: e1955ae2489bea9bdb46064562709a489ce6c627d6b63945fd0e03eca671de5b
Contents?: true
Size: 721 Bytes
Versions: 2
Compression:
Stored size: 721 Bytes
Contents
module Conversions CONVERSION = { :miles => { :kilometres => 1.609344 }, :kilograms => { :grams => 1000.0, :pounds => 2.20462262, :short_tons => 0.00110231131, :tons => 0.00110231131 }, :tons => { :pounds => 2000.0 }, :gallons => { :litres => 3.7854118 }, :cubic_feet => { :cubic_meters => 0.0283168466 }, :miles_per_gallon => { :kilometres_per_litre => 0.425143707 } } end require 'conversions/unit' require 'conversions/ext' require 'conversions/active_record_accessors' Numeric.send :include, Conversions::Ext if defined?(ActiveRecord) ActiveRecord::Base.send :extend, Conversions::ActiveRecordAccessors end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
seamusabshere-conversions-1.2.1 | lib/conversions.rb |
seamusabshere-conversions-1.2.2 | lib/conversions.rb |