Class: HTTPkit::Server::BlockHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/httpkit/server/block_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ BlockHandler

Returns a new instance of BlockHandler.



5
6
7
# File 'lib/httpkit/server/block_handler.rb', line 5

def initialize(block)
  @block = block
end

Instance Method Details

#serve(request, served) ⇒ Object



9
10
11
# File 'lib/httpkit/server/block_handler.rb', line 9

def serve(request, served)
  @block.call(request, served)
end