Class: BitsService::Blob
- Inherits:
-
Object
- Object
- BitsService::Blob
- Defined in:
- lib/bits_service_client/blob.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #attributes(*_) ⇒ Object
- #guid ⇒ Object
-
#initialize(key:, private_endpoint:, private_http_client:, vcap_request_id:, username:, password:, resource_type:) ⇒ Blob
constructor
A new instance of Blob.
- #internal_download_url ⇒ Object
- #public_download_url ⇒ Object
- #public_upload_url ⇒ Object
Constructor Details
#initialize(key:, private_endpoint:, private_http_client:, vcap_request_id:, username:, password:, resource_type:) ⇒ Blob
Returns a new instance of Blob.
6 7 8 9 10 11 12 13 14 |
# File 'lib/bits_service_client/blob.rb', line 6 def initialize(key:, private_endpoint:, private_http_client:, vcap_request_id:, username:, password:, resource_type:) @key = key @private_http_client = private_http_client @vcap_request_id = vcap_request_id @username = username @password =password @resource_type = resource_type @private_endpoint = private_endpoint end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/bits_service_client/blob.rb', line 4 def key @key end |
Instance Method Details
#attributes(*_) ⇒ Object
16 17 18 |
# File 'lib/bits_service_client/blob.rb', line 16 def attributes(*_) {} end |
#guid ⇒ Object
20 21 22 |
# File 'lib/bits_service_client/blob.rb', line 20 def guid key end |
#internal_download_url ⇒ Object
32 33 34 |
# File 'lib/bits_service_client/blob.rb', line 32 def internal_download_url generate_private_url(key) end |
#public_download_url ⇒ Object
24 25 26 |
# File 'lib/bits_service_client/blob.rb', line 24 def public_download_url signed_url(key) end |
#public_upload_url ⇒ Object
28 29 30 |
# File 'lib/bits_service_client/blob.rb', line 28 def public_upload_url signed_url(key, verb: 'put')+'&async=true' end |