Class: PrintHtml

Inherits:
Object
  • Object
show all
Defined in:
lib/print_html.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#temperatureObject (readonly)

Returns the value of attribute temperature.



5
6
7
# File 'lib/print_html.rb', line 5

def temperature
  @temperature
end

Instance Method Details



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