Class: Copy::Link

Inherits:
Base
  • Object
show all
Includes:
Operations::All, Operations::Create, Operations::Delete, Operations::Meta, Operations::Show
Defined in:
lib/copy/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Operations::Meta

included

Methods included from Operations::Create

included

Methods included from Operations::Delete

included

Methods included from Operations::Show

included

Methods included from Operations::All

included

Methods inherited from Base

#errors, #parse_timestamps, #set_attributes, #valid?

Methods included from Operations::Base

included

Constructor Details

#initialize(attributes = {}) ⇒ Link

Returns a new instance of Link.



18
19
20
21
22
# File 'lib/copy/link.rb', line 18

def initialize(attributes = {})
  super(attributes)
  parse_recipients
  parse_children
end

Instance Attribute Details

#childrenObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def children
  @children
end

#children_countObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def children_count
  @children_count
end

#confirmation_requiredObject

Returns the value of attribute confirmation_required.



9
10
11
# File 'lib/copy/link.rb', line 9

def confirmation_required
  @confirmation_required
end

#countsObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def counts
  @counts
end

#created_timeObject

Returns the value of attribute created_time.



9
10
11
# File 'lib/copy/link.rb', line 9

def created_time
  @created_time
end

#creator_idObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def creator_id
  @creator_id
end

#date_last_syncedObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def date_last_synced
  @date_last_synced
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/copy/link.rb', line 9

def id
  @id
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/copy/link.rb', line 9

def name
  @name
end

#object_countObject

Returns the value of attribute object_count.



9
10
11
# File 'lib/copy/link.rb', line 9

def object_count
  @object_count
end

#pathObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def path
  @path
end

#permissionsObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def permissions
  @permissions
end

#publicObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def public
  @public
end

#recipientsObject

Returns the value of attribute recipients.



9
10
11
# File 'lib/copy/link.rb', line 9

def recipients
  @recipients
end

#shareObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def share
  @share
end

#sizeObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def size
  @size
end

#statusObject

Returns the value of attribute status.



9
10
11
# File 'lib/copy/link.rb', line 9

def status
  @status
end

#stubObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def stub
  @stub
end

#syncingObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def syncing
  @syncing
end

#tokenObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def token
  @token
end

#typeObject

Metadata fields



14
15
16
# File 'lib/copy/link.rb', line 14

def type
  @type
end

#urlObject

Returns the value of attribute url.



9
10
11
# File 'lib/copy/link.rb', line 9

def url
  @url
end

#url_shortObject

Returns the value of attribute url_short.



9
10
11
# File 'lib/copy/link.rb', line 9

def url_short
  @url_short
end

Instance Method Details

#download_urlObject



24
25
26
27
# File 'lib/copy/link.rb', line 24

def download_url
  return unless url
  "#{url}?download=1"
end