class Temperature
Temperature
bijhouden en converteren
Constants
- FAHRENHEIT_OFFSET
- FAHRENHEIT_SLOPE
- KELVIN
Attributes
temperature[R]
Public Instance Methods
celsius()
click to toggle source
# File lib/temperature.rb, line 11 def celsius $temperature.to_f end
to_fahrenheit()
click to toggle source
# File lib/temperature.rb, line 15 def to_fahrenheit ($temperature.to_f * FAHRENHEIT_SLOPE) + FAHRENHEIT_OFFSET end
to_kelvin()
click to toggle source
# File lib/temperature.rb, line 19 def to_kelvin $temperature.to_f + KELVIN end