Module: ChemistryParadise::Wetter::EmbeddableInterface
- Included in:
- Sinatra
- Defined in:
- lib/chemistry_paradise/www/wetter/embeddable_interface.rb
Overview
Wetter::EmbeddableInterface
Instance Method Summary
collapse
Instance Method Details
#return_root_string ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/chemistry_paradise/www/wetter/embeddable_interface.rb', line 42
def return_root_string
current_temperature = ChemistryParadise.n_degrees_celsius?.to_s.dup
append_this = ''.dup
if current_temperature.to_f > 12
append_this << '°C</b><br><style>'+
Cyberweb.return_css_for_sunny_weather+
"</style>\n"+
'<div class="weather_container"><div class="weather_sunny"></div></div>'
else
append_this << '°C</b><br>'
end
Cyberweb::HtmlTemplate[
title: 'The weather/temperature in Vienna',
body: div('The current temperature in Vienna is: <br><br>'\
'<b style="padding:1em; margin:0.5em; font-size: larger">'+
current_temperature+
append_this,'','',
'font-size: 1.8em'
)
].to_s
end
|