Class: TemperatureOutputToText
- Inherits:
-
Object
- Object
- TemperatureOutputToText
- Defined in:
- lib/temperature_output_to_text.rb
Instance Attribute Summary collapse
-
#temp ⇒ Object
readonly
Returns the value of attribute temp.
Class Method Summary collapse
-
.to_text(celcius, fahrenheit, kelvin) ⇒ Object
——————————————————————— outputting.
Instance Attribute Details
#temp ⇒ Object (readonly)
Returns the value of attribute temp.
7 8 9 |
# File 'lib/temperature_output_to_text.rb', line 7 def temp @temp end |
Class Method Details
.to_text(celcius, fahrenheit, kelvin) ⇒ Object
outputting
12 13 14 15 16 17 |
# File 'lib/temperature_output_to_text.rb', line 12 def self.to_text(celcius, fahrenheit, kelvin) "Temperature\n" + "#{celcius} °C\n" + "#{fahrenheit} °F\n" + "#{kelvin} K\n" end |