Class: Files::SyncRunLiveTransfer
- Inherits:
-
Object
- Object
- Files::SyncRunLiveTransfer
- Defined in:
- lib/files.com/models/sync_run_live_transfer.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#bytes_copied ⇒ Object
int64 - Bytes transferred so far.
-
#bytes_total ⇒ Object
int64 - Total bytes of the file being transferred.
-
#eta ⇒ Object
string - Estimated time remaining (human-readable).
-
#initialize(attributes = {}, options = {}) ⇒ SyncRunLiveTransfer
constructor
A new instance of SyncRunLiveTransfer.
-
#path ⇒ Object
string - The file path being transferred.
-
#percentage ⇒ Object
double - Transfer progress from 0.0 to 1.0.
-
#started_at ⇒ Object
string - When this individual transfer started.
-
#status ⇒ Object
string - Status of this individual transfer.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ SyncRunLiveTransfer
Returns a new instance of SyncRunLiveTransfer.
7 8 9 10 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 5 def @options end |
Instance Method Details
#bytes_copied ⇒ Object
int64 - Bytes transferred so far
23 24 25 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 23 def bytes_copied @attributes[:bytes_copied] end |
#bytes_total ⇒ Object
int64 - Total bytes of the file being transferred
28 29 30 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 28 def bytes_total @attributes[:bytes_total] end |
#eta ⇒ Object
string - Estimated time remaining (human-readable)
38 39 40 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 38 def eta @attributes[:eta] end |
#path ⇒ Object
string - The file path being transferred. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
13 14 15 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 13 def path @attributes[:path] end |
#percentage ⇒ Object
double - Transfer progress from 0.0 to 1.0
33 34 35 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 33 def percentage @attributes[:percentage] end |
#started_at ⇒ Object
string - When this individual transfer started
43 44 45 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 43 def started_at @attributes[:started_at] end |
#status ⇒ Object
string - Status of this individual transfer
18 19 20 |
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 18 def status @attributes[:status] end |