Class: UberS3::Connection::Adapter

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

Direct Known Subclasses

EmHttp, EmHttpFibered, NetHttp

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s3, options = {}) ⇒ Adapter

Returns a new instance of Adapter.



22
23
24
25
26
27
28
29
# File 'lib/uber-s3/connection.rb', line 22

def initialize(s3, options={})
  self.s3                 = s3
  self.http               = nil
  self.uri                = nil
  self.access_key         = options[:access_key]
  self.secret_access_key  = options[:secret_access_key]
  self.defaults           = options[:defaults] || {}
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



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

def access_key
  @access_key
end

#defaultsObject

Returns the value of attribute defaults.



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

def defaults
  @defaults
end

#httpObject

Returns the value of attribute http.



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

def http
  @http
end

#s3Object

Returns the value of attribute s3.



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

def s3
  @s3
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



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

def secret_access_key
  @secret_access_key
end

#uriObject

Returns the value of attribute uri.



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

def uri
  @uri
end

Instance Method Details

#request(verb, url, headers = {}, body = nil) ⇒ Object



65
66
67
# File 'lib/uber-s3/connection.rb', line 65

def request(verb, url, headers={}, body=nil)
  raise "Abstract method"
end