Class: FsCache::Attributes::Size
- Inherits:
-
FsCache::Attribute
- Object
- FsCache::Attribute
- FsCache::Attributes::Size
- Defined in:
- lib/fs_cache/attributes/size.rb
Overview
Size attribute. Can be:
-
Integer: File size
Defined Under Namespace
Modules: Helpers
Instance Method Summary collapse
-
#attribute_for(file) ⇒ Object
Get the attribute for a given file.
Methods inherited from FsCache::Attribute
Instance Method Details
#attribute_for(file) ⇒ Object
Get the attribute for a given file
- Parameters
-
file (String): File to get the attribute for
- Result
-
Object: Corresponding attribute value
15 16 17 |
# File 'lib/fs_cache/attributes/size.rb', line 15 def attribute_for(file) File.stat(file).size end |