Module: AsyncRack::AsyncCallback

Defined in:
lib/async_rack/async_callback.rb

Overview

Helps wrapping already existent middleware in a transparent manner.

Examples:

module Rack
  class FancyMiddleware
  end
end

module AsyncRack
  class FancyMiddleware < AsyncCallback(:FancyMiddleware)
  end
end

Rack::FancyMiddleware # => AsyncRack::FancyMiddleware
AsyncRack::FancyMiddleware.ancestors # => [AsyncRack::AsyncCallback::Mixin, Rack::FancyMiddleware, ...]

Defined Under Namespace

Modules: InheritanceHook, LateInitializer, Mixin, SimpleWrapper

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



30
31
32
33
# File 'lib/async_rack/async_callback.rb', line 30

def self.included(mod)
  mod.send :include, Mixin
  super
end