Sha256: 1c12e0e6c29f36d993ad2813e4ac56bd6e9d58acacbc734306040d213d5fe910
Contents?: true
Size: 413 Bytes
Versions: 8
Compression:
Stored size: 413 Bytes
Contents
module Barometer module Data class Pressure < ConvertableUnits def mb; metric; end def in; imperial; end def units metric? ? 'mb' : 'in' end private def convert_imperial_to_metric(imperial_value) imperial_value.to_f * 33.8639 end def convert_metric_to_imperial(metric_value) metric_value.to_f * 0.02953 end end end end
Version data entries
8 entries across 8 versions & 1 rubygems