Class: VzaarApi::Signature::Abstract
- Inherits:
-
Object
- Object
- VzaarApi::Signature::Abstract
- Includes:
- Lib::HasResourceUrl
- Defined in:
- lib/vzaar_api/signature/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
readonly
Returns the value of attribute access_key_id.
-
#acl ⇒ Object
readonly
Returns the value of attribute acl.
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#guid ⇒ Object
readonly
Returns the value of attribute guid.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#success_action_status ⇒ Object
readonly
Returns the value of attribute success_action_status.
-
#upload_hostname ⇒ Object
readonly
Returns the value of attribute upload_hostname.
Class Method Summary collapse
Instance Method Summary collapse
- #after_initialize(attrs = {}) ⇒ Object
-
#initialize(attrs = {}) ⇒ Abstract
constructor
A new instance of Abstract.
- #multipart? ⇒ Boolean
Methods included from Lib::HasResourceUrl
Constructor Details
#initialize(attrs = {}) ⇒ Abstract
Returns a new instance of Abstract.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vzaar_api/signature/abstract.rb', line 11 def initialize(attrs = {}) @access_key_id = attrs[:access_key_id] @acl = attrs[:acl] @bucket = attrs[:bucket] @content_type = attrs[:content_type] @guid = attrs[:guid] @key = attrs[:key] @policy = attrs[:policy] @signature = attrs[:signature] @success_action_status = attrs[:success_action_status] @upload_hostname = attrs[:upload_hostname] after_initialize(attrs) end |
Instance Attribute Details
#access_key_id ⇒ Object (readonly)
Returns the value of attribute access_key_id.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def access_key_id @access_key_id end |
#acl ⇒ Object (readonly)
Returns the value of attribute acl.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def acl @acl end |
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def bucket @bucket end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def content_type @content_type end |
#guid ⇒ Object (readonly)
Returns the value of attribute guid.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def guid @guid end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def key @key end |
#policy ⇒ Object (readonly)
Returns the value of attribute policy.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def policy @policy end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def signature @signature end |
#success_action_status ⇒ Object (readonly)
Returns the value of attribute success_action_status.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def success_action_status @success_action_status end |
#upload_hostname ⇒ Object (readonly)
Returns the value of attribute upload_hostname.
7 8 9 |
# File 'lib/vzaar_api/signature/abstract.rb', line 7 def upload_hostname @upload_hostname end |
Class Method Details
.create(attrs = {}) ⇒ Object
33 34 35 36 |
# File 'lib/vzaar_api/signature/abstract.rb', line 33 def self.create(attrs = {}) attrs[:uploader] = UPLOADER new Lib::Api.new.post(resource_url, attrs).data end |
Instance Method Details
#after_initialize(attrs = {}) ⇒ Object
25 26 27 |
# File 'lib/vzaar_api/signature/abstract.rb', line 25 def after_initialize(attrs = {}) raise Error.new('Cannot call #after_initialize on Signature::Abstract') end |
#multipart? ⇒ Boolean
29 30 31 |
# File 'lib/vzaar_api/signature/abstract.rb', line 29 def multipart? raise Error.new('Cannot call #multipart? on Signature::Abstract') end |