Class: HttpStub::Server::Stub::Response::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/http_stub/server/stub/response/text.rb

Instance Attribute Summary

Attributes inherited from Base

#body, #delay_in_seconds, #headers, #status

Instance Method Summary collapse

Methods inherited from Base

add_default_headers, #empty?, #initialize, merge_defaults, #to_s, #type

Constructor Details

This class inherits a constructor from HttpStub::Server::Stub::Response::Base

Instance Method Details

#serve_on(server) ⇒ Object



10
11
12
# File 'lib/http_stub/server/stub/response/text.rb', line 10

def serve_on(server)
  server.halt(@status, @headers.to_hash, @body)
end