Sha256: 71f34e686ae7d591574d162a1dbf2651e1f90656c1383d83d62313164a49f1c5

Contents?: true

Size: 256 Bytes

Versions: 8

Compression:

Stored size: 256 Bytes

Contents

class Rack::App::Middlewares::Hooks::Before

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

  def call(env)
    env[Rack::App::Constants::ENV::REQUEST_HANDLER].instance_exec(&@hook_block)
    @app.call(env)
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-app-5.5.1 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.4.0 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.3.2 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.3.1 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.3.0 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.2.0 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.1.0 lib/rack/app/middlewares/hooks/before.rb
rack-app-5.0.0 lib/rack/app/middlewares/hooks/before.rb