class ActiveSupport::Reloader

def self.wrap(**kwargs)

Run the supplied block as a work unit, reloading code as needed
def self.wrap(**kwargs)
  return yield if active?
  executor.wrap(**kwargs) do
    instance = run!
    begin
      yield
    ensure
      instance.complete!
    end
  end
end