Sha256: 546c5a5685b66a08554d06e039e86c4d8e185184a5d8807b7402d64651cd236d

Contents?: true

Size: 358 Bytes

Versions: 15

Compression:

Stored size: 358 Bytes

Contents

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

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

  def call(env)
    raise(NotImplementedError)
  end

  protected

  def execute_hook(env)
    catch :rack_response do
      env[Rack::App::Constants::ENV::REQUEST_HANDLER].instance_exec(&@hook_block)
      nil
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rack-app-6.3.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.2.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.1.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.0.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.12.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.11.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.11.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.10.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.10.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.10.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.9.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.8.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.7.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-5.7.0.rc lib/rack/app/middlewares/hooks/base.rb
rack-app-5.6.0 lib/rack/app/middlewares/hooks/base.rb