Class: HttpStub::Server::Application::ResponsePipeline

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/server/application/response_pipeline.rb

Instance Method Summary collapse

Constructor Details

#initialize(application) ⇒ ResponsePipeline

Returns a new instance of ResponsePipeline.



7
8
9
# File 'lib/http_stub/server/application/response_pipeline.rb', line 7

def initialize(application)
  @application = application
end

Instance Method Details

#process(response) ⇒ Object



11
12
13
14
# File 'lib/http_stub/server/application/response_pipeline.rb', line 11

def process(response)
  sleep response.delay_in_seconds
  response.serve_on(@application)
end