Sha256: e290de214d3f9229538c289f53d6ab0f090f610ba042c0e950542b20453b0a0b

Contents?: true

Size: 350 Bytes

Versions: 33

Compression:

Stored size: 350 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::HANDLER].instance_exec(&@hook_block)
      nil
    end
  end

end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
rack-app-7.2.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.1.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.0.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.8.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.7.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.7.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.6.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.5.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.4.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.4.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.3.3 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.3.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-6.3.1 lib/rack/app/middlewares/hooks/base.rb