Class: Files::BundleFile
- Inherits:
-
Object
- Object
- Files::BundleFile
- Defined in:
- lib/files.com/models/bundle_file.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
-
#download_uri ⇒ Object
string - Bundle file download URI.
-
#initialize(attributes = {}, options = {}) ⇒ BundleFile
constructor
A new instance of BundleFile.
-
#path ⇒ Object
string - File path This must be slash-delimited, but it must neither start nor end with a slash.
-
#size ⇒ Object
int64 - File size.
-
#type ⇒ Object
string - Type of ‘directory’ or ‘file’.
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 = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/bundle_file.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/bundle_file.rb', line 5 def @options end |
Instance Method Details
#download_uri ⇒ Object
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 |
#path ⇒ Object
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 |
#size ⇒ Object
int64 - File size
23 24 25 |
# File 'lib/files.com/models/bundle_file.rb', line 23 def size @attributes[:size] end |
#type ⇒ Object
string - Type of ‘directory’ or ‘file’
28 29 30 |
# File 'lib/files.com/models/bundle_file.rb', line 28 def type @attributes[:type] end |