Class: HttpStub::Server::ResponsePipeline

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

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ ResponsePipeline

Returns a new instance of ResponsePipeline.



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

def initialize(server)
  @server = server
end

Instance Method Details

#process(response) ⇒ Object



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

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