Class: PrintHtml
- Inherits:
-
Object
- Object
- PrintHtml
- Defined in:
- lib/print_html.rb
Instance Attribute Summary collapse
-
#temperature ⇒ Object
readonly
Returns the value of attribute temperature.
Instance Method Summary collapse
Instance Attribute Details
#temperature ⇒ Object (readonly)
Returns the value of attribute temperature.
5 6 7 |
# File 'lib/print_html.rb', line 5 def temperature @temperature end |
Instance Method Details
#print ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/print_html.rb', line 7 def print htmltemerature = Temperature.new puts "<div>" puts " <div>" + htmltemerature.celsius.to_s + " °C</div>" puts " <div>" + htmltemerature.to_fahrenheit.to_s + " °F</div>" puts " <div>" + htmltemerature.to_kelvin.to_s + " K</div>" puts "</div>" end |