Class: Files::SyncRunLiveTransfer

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/sync_run_live_transfer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (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

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/sync_run_live_transfer.rb', line 5

def options
  @options
end

Instance Method Details

#bytes_copiedObject

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_totalObject

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

#etaObject

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

#pathObject

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

#percentageObject

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_atObject

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

#statusObject

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