Class: CryptKeeper::Connection
- Inherits:
-
Object
- Object
- CryptKeeper::Connection
- Includes:
- Buckets
- Defined in:
- lib/crypt_keeper.rb
Overview
For example: keeper = CryptKeeper::Connection.new(=> ‘your_access_key’, :secret_key => ‘your_secret_key’)
Constant Summary collapse
- @@http_instance =
nil
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Connection
constructor
A new instance of Connection.
Methods included from Buckets
#bucket_meta_objects, #buckets, #connection, #create_bucket, #find_buckets
Constructor Details
#initialize(*args) ⇒ Connection
Returns a new instance of Connection.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/crypt_keeper.rb', line 23 def initialize(*args) = { :signature_identifier => "GOOG1", :host => "commondatastorage.googleapis.com", :port => "80" } .merge!(args.pop) if args.last.kind_of? Hash @host = [:host] @access_key = [:access_key] @secret_key = [:secret_key] @signature_id = [:signature_identifier] @@http_instance = CryptKeeperHttp.new(@host, @access_key, @secret_key, @signature_id) end |
Class Method Details
.http_instance ⇒ Object
20 21 22 |
# File 'lib/crypt_keeper.rb', line 20 def self.http_instance @@http_instance end |