Class: TemperatureOutputToJson
- Inherits:
-
Object
- Object
- TemperatureOutputToJson
- Defined in:
- lib/temperature_output_to_json.rb
Instance Attribute Summary collapse
-
#temp ⇒ Object
readonly
Returns the value of attribute temp.
Class Method Summary collapse
Instance Attribute Details
#temp ⇒ Object (readonly)
Returns the value of attribute temp.
7 8 9 |
# File 'lib/temperature_output_to_json.rb', line 7 def temp @temp end |
Class Method Details
.to_json(celcius, fahrenheit, kelvin) ⇒ Object
13 14 15 |
# File 'lib/temperature_output_to_json.rb', line 13 def self.to_json(celcius, fahrenheit, kelvin) "(celcius: #{celcius}, fahrenheit: #{fahrenheit}, kelvin: #{kelvin})" end |