Sha256: 5cfd60ebe8ec85a5d2583675880d5243f46d80a334033dd7c428894094a6fc3a
Contents?: true
Size: 515 Bytes
Versions: 1
Compression:
Stored size: 515 Bytes
Contents
require 'chemistry/temperature' module Chemistry class Temperature class Celsius < Chemistry::Temperature def to_celsius self end def to_kelvin Chemistry::Temperature.kelvin convert_to_kelvin end def convert_to_kelvin @temperature + 273.15 end def to_fahrenheit Chemistry::Temperature.fahrenheit convert_to_fahrenheit end def convert_to_fahrenheit (@temperature * (9.0/5.0)) + 32.0 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chemistry-0.0.3 | lib/chemistry/temperature/celsius.rb |