Class: Etna::Clients::Metis::UploadResponse
- Inherits:
-
Object
- Object
- Etna::Clients::Metis::UploadResponse
- Defined in:
- lib/etna/clients/metis/models.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #current_byte_position ⇒ Object
-
#initialize(raw = {}) ⇒ UploadResponse
constructor
A new instance of UploadResponse.
- #next_blob_size ⇒ Object
- #upload_path ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(raw = {}) ⇒ UploadResponse
Returns a new instance of UploadResponse.
310 311 312 |
# File 'lib/etna/clients/metis/models.rb', line 310 def initialize(raw = {}) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
309 310 311 |
# File 'lib/etna/clients/metis/models.rb', line 309 def raw @raw end |
Instance Method Details
#current_byte_position ⇒ Object
314 315 316 |
# File 'lib/etna/clients/metis/models.rb', line 314 def current_byte_position raw['current_byte_position'].to_i end |
#next_blob_size ⇒ Object
322 323 324 |
# File 'lib/etna/clients/metis/models.rb', line 322 def next_blob_size raw['next_blob_size'].to_i end |
#upload_path ⇒ Object
326 327 328 |
# File 'lib/etna/clients/metis/models.rb', line 326 def upload_path url.sub(%r!^https://[^/]*?/!, '/') end |
#url ⇒ Object
318 319 320 |
# File 'lib/etna/clients/metis/models.rb', line 318 def url raw['url'] || '' end |