Class: Dropbox::UploadSessionCursor

Inherits:
Object
  • Object
show all
Defined in:
lib/dropbox/upload_session_cursor.rb

Overview

UploadSessionCursor holds information about an in-progress upload session.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session_id, offset) ⇒ UploadSessionCursor


12
13
14
15
# File 'lib/dropbox/upload_session_cursor.rb', line 12

def initialize(session_id, offset)
  @session_id = session_id
  @offset = offset
end

Instance Attribute Details

#offsetInteger

The size of the data uploaded so far.


6
7
8
# File 'lib/dropbox/upload_session_cursor.rb', line 6

def offset
  @offset
end

#session_idString

A unique identifier for the session.


6
7
8
# File 'lib/dropbox/upload_session_cursor.rb', line 6

def session_id
  @session_id
end

Instance Method Details

#to_hHash


18
19
20
# File 'lib/dropbox/upload_session_cursor.rb', line 18

def to_h
  {session_id: session_id, offset: offset}
end