Sha256: 930e979e21796e7538af4868e24769024433ca1d714f66c5718236bddaf60532

Contents?: true

Size: 248 Bytes

Versions: 1

Compression:

Stored size: 248 Bytes

Contents

module Forecastr
  class TemperatureConverter
    class << self
      def to_celsius kelvins
        (kelvins - 273.15).round(2)
      end

      def to_farenheit kelvins
        (1.8 * (kelvins - 273.15) + 32).round(2)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forecastr-0.1.5 lib/forecastr/temperature_converter.rb