Class: Files::Preview
- Inherits:
-
Object
- Object
- Files::Preview
- Defined in:
- lib/files.com/models/preview.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 - Link to download preview.
-
#id ⇒ Object
int64 - Preview ID.
-
#initialize(attributes = {}, options = {}) ⇒ Preview
constructor
A new instance of Preview.
-
#size ⇒ Object
int64 - Preview size.
-
#status ⇒ Object
string - Preview status.
-
#type ⇒ Object
string - Preview status.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ Preview
Returns a new instance of Preview.
7 8 9 10 |
# File 'lib/files.com/models/preview.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/preview.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/preview.rb', line 5 def @options end |
Instance Method Details
#download_uri ⇒ Object
string - Link to download preview
23 24 25 |
# File 'lib/files.com/models/preview.rb', line 23 def download_uri @attributes[:download_uri] end |
#id ⇒ Object
int64 - Preview ID
13 14 15 |
# File 'lib/files.com/models/preview.rb', line 13 def id @attributes[:id] end |
#size ⇒ Object
int64 - Preview size
33 34 35 |
# File 'lib/files.com/models/preview.rb', line 33 def size @attributes[:size] end |
#status ⇒ Object
string - Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
18 19 20 |
# File 'lib/files.com/models/preview.rb', line 18 def status @attributes[:status] end |
#type ⇒ Object
string - Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
28 29 30 |
# File 'lib/files.com/models/preview.rb', line 28 def type @attributes[:type] end |