class Temperature

Constants

FAHRENHEIT_OFFSET
FAHRENHEIT_SLOPE
KELVIN

Attributes

temperature[R]

Public Instance Methods

celsius() click to toggle source
# File lib/temperature.rb, line 9
def celsius
              $temperature.to_f
      end
to_fahrenheit() click to toggle source
# File lib/temperature.rb, line 13
def to_fahrenheit
       ($temperature.to_f * FAHRENHEIT_SLOPE) + FAHRENHEIT_OFFSET
end
to_kelvin() click to toggle source
# File lib/temperature.rb, line 17
def to_kelvin
      $temperature.to_f + KELVIN
end