Class: Sinatra::Reloader
- Inherits:
-
Rack::Reloader
- Object
- Rack::Reloader
- Sinatra::Reloader
- Defined in:
- lib/ext/reloader.rb
Overview
Reload scripts and reset routes on change
Instance Method Summary collapse
Instance Method Details
#safe_load(file, mtime, stderr = $stderr) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/ext/reloader.rb', line 3 def safe_load(file, mtime, stderr = $stderr) if file == __FILE__ ::Sinatra::Application.reset! stderr.puts "#{self.class}: resetting routes" end super end |