Method: S3File#initialize

Defined in:
lib/s3file.rb

#initialize(keys = {}) ⇒ S3File

Intialize the object to the bucket given the access_key and secret_access_key You need to have the following set *:access_key and *:secret_access_key s3cmd requires a config file to be created. Based upon the values provided - a .s3file.cfg is created in the users home directory. If the keys are not provided - it will raise an InitializationError



21
22
23
24
25
26
# File 'lib/s3file.rb', line 21

def initialize(keys = {})
  if keys.nil? || keys[:access_key].nil? || keys[:secret_access_key].nil?
    raise(InitializationError, "Keys not set when initializing S3 connection")
  end
  S3File.create_config_file(keys)
end