Class: Megar::File
- Inherits:
-
Object
- Object
- Megar::File
- Includes:
- CatalogItem
- Defined in:
- lib/megar/catalog/file.rb
Overview
File collection item
Instance Attribute Summary collapse
-
#size ⇒ Object
The file size.
Attributes included from CatalogItem
#id, #key, #name, #payload, #type
Instance Method Summary collapse
-
#to_s ⇒ Object
Return a pretty version of the file record.
Methods included from CatalogItem
#==, #[], #attributes=, #collection, #each, #find_by_type, #initialize, #reset!, #resource_class
Instance Attribute Details
#size ⇒ Object
The file size
6 7 8 |
# File 'lib/megar/catalog/file.rb', line 6 def size @size end |
Instance Method Details
#to_s ⇒ Object
Return a pretty version of the file record
10 11 12 |
# File 'lib/megar/catalog/file.rb', line 10 def to_s format("%16d bytes %-10s %-60s", size.to_i, id, name) end |