Class: Puppet::Network::HTTP::MemoryResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/network/http/memory_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMemoryResponse

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

#bodyObject (readonly)

Returns the value of attribute body.



2
3
4
# File 'lib/puppet/network/http/memory_response.rb', line 2

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



2
3
4
# File 'lib/puppet/network/http/memory_response.rb', line 2

def code
  @code
end

#typeObject (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