Sha256: 11d70fb4308b002bfc7efbf055518b433045aa20eaab201aaa91caf3c16062e8

Contents?: true

Size: 280 Bytes

Versions: 5

Compression:

Stored size: 280 Bytes

Contents

class Rack::App::Middlewares::Hooks::Base

  def initialize(app, hook)
    @app = app
    @hook = hook
  end

  def call(env)
    raise(NotImplementedError)
  end

  protected

  def execute_hook(env)
    catch :rack_response do
      @hook.exec(env)
      nil
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-11.0.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-11.0.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-10.0.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-9.0.0 lib/rack/app/middlewares/hooks/base.rb