Class: Qiniu2Upyun::Config::Qiniu
- Inherits:
-
Object
- Object
- Qiniu2Upyun::Config::Qiniu
- Defined in:
- lib/qiniu2upyun/config.rb
Instance Attribute Summary collapse
-
#access_key ⇒ Object
readonly
Returns the value of attribute access_key.
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
Instance Method Summary collapse
- #default_domain ⇒ Object
-
#initialize(options) ⇒ Qiniu
constructor
A new instance of Qiniu.
Constructor Details
#initialize(options) ⇒ Qiniu
Returns a new instance of Qiniu.
6 7 8 9 10 11 |
# File 'lib/qiniu2upyun/config.rb', line 6 def initialize() @access_key = ['access_key'] @secret_key = ['secret_key'] @bucket = ['bucket'] @domain = ['domain'] || default_domain end |
Instance Attribute Details
#access_key ⇒ Object (readonly)
Returns the value of attribute access_key.
4 5 6 |
# File 'lib/qiniu2upyun/config.rb', line 4 def access_key @access_key end |
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
4 5 6 |
# File 'lib/qiniu2upyun/config.rb', line 4 def bucket @bucket end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
4 5 6 |
# File 'lib/qiniu2upyun/config.rb', line 4 def domain @domain end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
4 5 6 |
# File 'lib/qiniu2upyun/config.rb', line 4 def secret_key @secret_key end |
Instance Method Details
#default_domain ⇒ Object
13 14 15 |
# File 'lib/qiniu2upyun/config.rb', line 13 def default_domain "http://#{bucket}.qiniudn.com" end |