Class: Puppet::Network::HTTP::MemoryResponse
- Defined in:
- lib/puppet/network/http/memory_response.rb
Instance Attribute Summary collapse
- #body ⇒ Object readonly
- #code ⇒ Object readonly
- #type ⇒ Object readonly
Instance Method Summary collapse
-
#initialize ⇒ MemoryResponse
constructor
A new instance of MemoryResponse.
- #respond_with(code, type, body) ⇒ Object
Constructor Details
#initialize ⇒ MemoryResponse
Returns a new instance of MemoryResponse.
6 7 8 |
# File 'lib/puppet/network/http/memory_response.rb', line 6 def initialize @body = ''.dup end |
Instance Attribute Details
#body ⇒ Object (readonly)
4 5 6 |
# File 'lib/puppet/network/http/memory_response.rb', line 4 def body @body end |
#code ⇒ Object (readonly)
4 5 6 |
# File 'lib/puppet/network/http/memory_response.rb', line 4 def code @code end |
#type ⇒ Object (readonly)
4 5 6 |
# File 'lib/puppet/network/http/memory_response.rb', line 4 def type @type end |
Instance Method Details
#respond_with(code, type, body) ⇒ Object
10 11 12 13 14 |
# File 'lib/puppet/network/http/memory_response.rb', line 10 def respond_with(code, type, body) @code = code @type = type @body += body end |