Exception: S3Light::Connection::HttpError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HttpError

Returns a new instance of HttpError.



8
9
10
11
# File 'lib/s3-light/connection.rb', line 8

def initialize(response)
  @response = response
  super("HTTP Error: #{response.code} - #{response.body}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



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

def response
  @response
end

Instance Method Details

#codeObject



13
14
15
# File 'lib/s3-light/connection.rb', line 13

def code
  @response.code
end