Class: Files::ZipListEntry
- Inherits:
-
Object
- Object
- Files::ZipListEntry
- Defined in:
- lib/files.com/models/zip_list_entry.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
-
#initialize(attributes = {}, options = {}) ⇒ ZipListEntry
constructor
A new instance of ZipListEntry.
-
#path ⇒ Object
string - Entry path inside the ZIP.
-
#size ⇒ Object
int64 - Uncompressed size in bytes.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ ZipListEntry
Returns a new instance of ZipListEntry.
7 8 9 10 |
# File 'lib/files.com/models/zip_list_entry.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/zip_list_entry.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/zip_list_entry.rb', line 5 def @options end |
Instance Method Details
#path ⇒ Object
string - Entry path inside the ZIP. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
13 14 15 |
# File 'lib/files.com/models/zip_list_entry.rb', line 13 def path @attributes[:path] end |
#size ⇒ Object
int64 - Uncompressed size in bytes.
18 19 20 |
# File 'lib/files.com/models/zip_list_entry.rb', line 18 def size @attributes[:size] end |