Class: Aliyun::OSS::Connection::Options
- Defined in:
- lib/aliyun/oss/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
- #connecting_through_proxy? ⇒ Boolean
-
#initialize(options = {}) ⇒ Options
constructor
A new instance of Options.
- #proxy_settings ⇒ Object
Methods inherited from Hash
#extractable_options?, #to_normalized_options, #to_normalized_options!, #to_query_string
Constructor Details
#initialize(options = {}) ⇒ Options
Returns a new instance of Options.
255 256 257 258 259 260 |
# File 'lib/aliyun/oss/connection.rb', line 255 def initialize( = {}) super() validate() replace(:server => DEFAULT_HOST, :port => ([:use_ssl] ? 443 : 80)) merge!() end |
Instance Method Details
#connecting_through_proxy? ⇒ Boolean
262 263 264 |
# File 'lib/aliyun/oss/connection.rb', line 262 def connecting_through_proxy? !self[:proxy].nil? end |
#proxy_settings ⇒ Object
266 267 268 |
# File 'lib/aliyun/oss/connection.rb', line 266 def proxy_settings self[:proxy].values_at(:host, :port, :user, :password) end |