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.



5
6
7
# File 'lib/puppet/network/http/memory_response.rb', line 5

def initialize
  @body = String.new
end

Instance Attribute Details

#bodyObject (readonly)



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

def body
  @body
end

#codeObject (readonly)



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

def code
  @code
end

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