Class: TemperatureOutputToHtml

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#tempObject (readonly)

Returns the value of attribute temp.



7
8
9
# File 'lib/temperature_output_to_html.rb', line 7

def temp
  @temp
end

Class Method Details

.to_html(celcius, fahrenheit, kelvin) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/temperature_output_to_html.rb', line 13

def self.to_html(celcius, fahrenheit, kelvin)
	"<div>\n" +
			"<div>#{celcius} °C</div>\n" +
			"<div>#{fahrenheit} °F</div>\n" +
			"<div>#{kelvin} K</div>\n" +
		"</div>"
end