class Wetter::Sinatra
Constants
- USE_THIS_PORT
#¶ ↑
USE_THIS_PORT
¶ ↑#¶ ↑
Public Class Methods
new()
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
Calls superclass method
# File lib/wetter/www/app.rb, line 31 def initialize super() reset if ::Wetter.is_on_roebe? require 'open_in_browser' # ===================================================================== # # Tell us which port will be used: # ===================================================================== # target = "http://localhost:#{USE_THIS_PORT}/" e sfancy(target) Thread.new { OpenInBrowser[target] {{ delay: '1.0 seconds' }} } end end
Public Instance Methods
reset()
click to toggle source
return_root_string()
click to toggle source
#¶ ↑
return_root_string
¶ ↑
#¶ ↑
# File lib/wetter/www/app.rb, line 65 def return_root_string html { '<title>The weather/temperature in Vienna</title>'+ '<body>'+ p('The current temperature in Vienna is: <br><br>'\ '<b style="padding:1em; margin:0.5em; font-size: larger">'+ Wetter.n_degrees_celsius?.to_s+'°C</b><br>','','', 'font-size:1.8em' )+'</body>' } end