class QueueCleanup
whenever reloading adds to the queue, cull old entries
Public Class Methods
new(app)
click to toggle source
# File lib/wunderbar/server.rb, line 34 def initialize(app) @app = app @queue = [] end
Public Instance Methods
call(env)
click to toggle source
# File lib/wunderbar/server.rb, line 39 def call(env) if Wunderbar.queue != @queue @queue.each {|item| Wunderbar.queue.delete(item)} @queue = Wunderbar.queue.dup end @app.call(env) end