Sha256: f97ea2376647a6ab0941564daad98a008a3cbea9821b177d6bd0cea22ddbcbf4
Contents?: true
Size: 245 Bytes
Versions: 3
Compression:
Stored size: 245 Bytes
Contents
module Forecastr class Temperature def initialize(kelvin) @kelvin = kelvin end def to_celsius (@kelvin - 273.15).round(2) end def to_farenheit (1.8 * (@kelvin - 273.15) + 32).round(2) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
forecastr-0.1.2 | lib/forecastr/temperature.rb |
forecastr-0.1.1 | lib/forecastr/temperature.rb |
forecastr-0.1.0 | lib/forecastr/temperature.rb |