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.
5 6 7 |
# File 'lib/puppet/network/http/memory_response.rb', line 5 def initialize @body = String.new end |
Instance Attribute Details
#body ⇒ Object (readonly)
3 4 5 |
# File 'lib/puppet/network/http/memory_response.rb', line 3 def body @body end |
#code ⇒ Object (readonly)
3 4 5 |
# File 'lib/puppet/network/http/memory_response.rb', line 3 def code @code end |
#type ⇒ Object (readonly)
3 4 5 |
# File 'lib/puppet/network/http/memory_response.rb', line 3 def type @type end |
Instance Method Details
#respond_with(code, type, body) ⇒ Object
9 10 11 12 13 |
# File 'lib/puppet/network/http/memory_response.rb', line 9 def respond_with(code, type, body) @code = code @type = type @body += body end |