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.



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

def initialize
  @body = ''.dup
end

Instance Attribute Details

#bodyObject (readonly)



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

def body
  @body
end

#codeObject (readonly)



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

def code
  @code
end

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