Class: Mail2cb::Handler
- Inherits:
-
Object
- Object
- Mail2cb::Handler
- Defined in:
- lib/mail2cb.rb
Instance Method Summary collapse
-
#initialize ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
#initialize ⇒ Handler
Returns a new instance of Handler.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/mail2cb.rb', line 17 def initialize @@watcher = EmailWatcher.new @@watcher.start Thread.abort_on_exception = true my_app = Sinatra.new do set :logging, false set :run, false set :bind, '0.0.0.0' get('/reload') do @@watcher.restart "OK" end end my_app.run! end |