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-8.1.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-8.0.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-8.0.0 lib/rack/app/middlewares/hooks/base.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/middlewares/hooks/base.rb
rack-app-7.7.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.6.5 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.6.4 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.6.3 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.6.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.6.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.6.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.5.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.5.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.5.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.4.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.3.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.3.1 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.3.0 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.2.2 lib/rack/app/middlewares/hooks/base.rb
rack-app-7.2.1 lib/rack/app/middlewares/hooks/base.rb