Class: Puppet::Network::HTTP::MemoryResponse
- Defined in:
- lib/puppet/network/http/memory_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
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.
4 5 6 |
# File 'lib/puppet/network/http/memory_response.rb', line 4 def initialize @body = "" end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
2 3 4 |
# File 'lib/puppet/network/http/memory_response.rb', line 2 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
2 3 4 |
# File 'lib/puppet/network/http/memory_response.rb', line 2 def code @code end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
2 3 4 |
# File 'lib/puppet/network/http/memory_response.rb', line 2 def type @type end |
Instance Method Details
#respond_with(code, type, body) ⇒ Object
8 9 10 11 12 |
# File 'lib/puppet/network/http/memory_response.rb', line 8 def respond_with(code, type, body) @code = code @type = type @body += body end |