Class: TemperatureOutput

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#tempObject (readonly)

Returns the value of attribute temp.



10
11
12
# File 'lib/temperature_output.rb', line 10

def temp
  @temp
end

Class Method Details

.show_output(converted_temp) ⇒ Object


outputting



15
16
17
18
19
# File 'lib/temperature_output.rb', line 15

def self.show_output(converted_temp)
	show_to_text(converted_temp)
	show_to_html(converted_temp)
	show_to_json(converted_temp)
end

.show_to_html(converted_temp) ⇒ Object



27
28
29
30
31
# File 'lib/temperature_output.rb', line 27

def self.show_to_html(converted_temp)
	puts '>to_html'
	puts TemperatureOutputToHtml.to_html(converted_temp[0], converted_temp[1], converted_temp[2])
	puts ''
end

.show_to_json(converted_temp) ⇒ Object



33
34
35
36
37
# File 'lib/temperature_output.rb', line 33

def self.show_to_json(converted_temp)
	puts '>to_json'
	puts TemperatureOutputToJson.to_json(converted_temp[0], converted_temp[1], converted_temp[2])
	puts ''
end

.show_to_text(converted_temp) ⇒ Object



21
22
23
24
25
# File 'lib/temperature_output.rb', line 21

def self.show_to_text(converted_temp)
		puts '>to_text'
		puts TemperatureOutputToText.to_text(converted_temp[0], converted_temp[1], converted_temp[2])
		puts ''
end