Class: S3::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/S3.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



779
780
781
# File 'lib/S3.rb', line 779

def initialize(response)
  @http_response = response
end

Instance Attribute Details

#http_responseObject (readonly)

Returns the value of attribute http_response.



778
779
780
# File 'lib/S3.rb', line 778

def http_response
  @http_response
end

Instance Method Details

#messageObject



783
784
785
786
787
788
789
# File 'lib/S3.rb', line 783

def message
  if @http_response.body
    @http_response.body
  else
    "#{@http_response.code} #{@http_response.message}"
  end
end