Class: Tempura::Fahrenheit
- Inherits:
-
Temperature
- Object
- Temperature
- Tempura::Fahrenheit
- Defined in:
- lib/tempura/fahrenheit.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Temperature
#*, #+, #-, #/, #<=>, #initialize, #to, #to_d, #to_f, #to_i
Constructor Details
This class inherits a constructor from Tempura::Temperature
Class Method Details
.as_native(k) ⇒ Object
7 8 9 |
# File 'lib/tempura/fahrenheit.rb', line 7 def self.as_native(k) ((k * 9)/5) - BigDecimal("459.67") end |
Instance Method Details
#from_native(given) ⇒ Object
3 4 5 |
# File 'lib/tempura/fahrenheit.rb', line 3 def from_native(given) ((given + BigDecimal("459.67")) * 5) / 9 end |