Class: Qlive::DevReload
- Inherits:
-
Object
- Object
- Qlive::DevReload
- Defined in:
- lib/qlive/dev_reload.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, opts = {}) ⇒ DevReload
constructor
A new instance of DevReload.
Constructor Details
#initialize(app, opts = {}) ⇒ DevReload
Returns a new instance of DevReload.
4 5 6 |
# File 'lib/qlive/dev_reload.rb', line 4 def initialize(app, opts={}) @app = app end |
Class Method Details
.reload_main ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/qlive/dev_reload.rb', line 14 def self.reload_main Registry.reset_all load "#{File.('../rack.rb', __FILE__)}" load "#{File.('../qunit_assets.rb', __FILE__)}" load "#{File.('../suite.rb', __FILE__)}" load "#{File.('../registry.rb', __FILE__)}" Registry.find_suites end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/qlive/dev_reload.rb', line 8 def call(env) self.class.reload_main if env['QUERY_STRING'].include?('qlive=') @app.call(env) end |