module AsyncRackTest::Methods

Public Instance Methods

async_app() click to toggle source

The original app

# File lib/async_rack_test.rb, line 13
def async_app
  @async_app ||= app
end
sync_app() click to toggle source
# File lib/async_rack_test.rb, line 16
def sync_app
  @sync_app ||= begin
    ResyncApp.new(async_app)
  end
end
use_async() click to toggle source
# File lib/async_rack_test.rb, line 26
def use_async
  async_app # Ensure we have cached the original app first.
  self.instance_eval { class << self; self; end }.class_eval { alias :app :async_app }
end
use_sync() click to toggle source
# File lib/async_rack_test.rb, line 22
def use_sync
  async_app # Ensure we have cached the original app first.
  self.instance_eval { class << self; self; end }.class_eval { alias :app :sync_app }
end