Class: Puppet::Network::HTTP::Response
- Defined in:
- lib/puppet/network/http/response.rb
Instance Method Summary collapse
-
#initialize(handler, response) ⇒ Response
constructor
A new instance of Response.
- #respond_with(code, type, body) ⇒ Object
Constructor Details
#initialize(handler, response) ⇒ Response
Returns a new instance of Response.
2 3 4 5 |
# File 'lib/puppet/network/http/response.rb', line 2 def initialize(handler, response) @handler = handler @response = response end |
Instance Method Details
#respond_with(code, type, body) ⇒ Object
7 8 9 10 |
# File 'lib/puppet/network/http/response.rb', line 7 def respond_with(code, type, body) @handler.set_content_type(@response, type) @handler.set_response(@response, body, code) end |