Class: S3Light::Connection::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/s3-light/connection/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(http_response) ⇒ Response

Returns a new instance of Response.



6
7
8
# File 'lib/s3-light/connection/response.rb', line 6

def initialize(http_response)
  @http_response = http_response
end

Instance Method Details

#bodyObject



20
21
22
# File 'lib/s3-light/connection/response.rb', line 20

def body
  @http_response.body
end

#codeObject



16
17
18
# File 'lib/s3-light/connection/response.rb', line 16

def code
  @http_response.code
end

#xmlObject



10
11
12
13
14
# File 'lib/s3-light/connection/response.rb', line 10

def xml
  return @xml if defined? @xml

  @xml = Nokogiri::XML(@http_response.body.to_s)
end