Class: AWS::S3::Connection::Options

Inherits:
Hash
  • Object
show all
Defined in:
lib/aws/s3/connection.rb

Overview

:nodoc:

Constant Summary collapse

VALID_OPTIONS =
[:access_key_id, :secret_access_key, :server, :port, :use_ssl, :persistent, :proxy].freeze

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Options

Returns a new instance of Options.



256
257
258
259
260
261
# File 'lib/aws/s3/connection.rb', line 256

def initialize(options = {})
  super()
  validate(options)
  replace(:server => DEFAULT_HOST, :port => (options[:use_ssl] ? 443 : 80))
  merge!(options)
end

Instance Method Details

#connecting_through_proxy?Boolean

Returns:

  • (Boolean)


263
264
265
# File 'lib/aws/s3/connection.rb', line 263

def connecting_through_proxy?
  !self[:proxy].nil?
end

#proxy_settingsObject



267
268
269
# File 'lib/aws/s3/connection.rb', line 267

def proxy_settings
  self[:proxy].values_at(:host, :port, :user, :password)
end