Class: Files::BundleFile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ BundleFile

Returns a new instance of BundleFile.



7
8
9
10
# File 'lib/files.com/models/bundle_file.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/bundle_file.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#download_uriObject

string - Bundle file download URI



13
14
15
# File 'lib/files.com/models/bundle_file.rb', line 13

def download_uri
  @attributes[:download_uri]
end

#pathObject

string - File path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.



18
19
20
# File 'lib/files.com/models/bundle_file.rb', line 18

def path
  @attributes[:path]
end

#sizeObject

int64 - File size



23
24
25
# File 'lib/files.com/models/bundle_file.rb', line 23

def size
  @attributes[:size]
end

#typeObject

string - Type of ‘directory’ or ‘file’



28
29
30
# File 'lib/files.com/models/bundle_file.rb', line 28

def type
  @attributes[:type]
end