Class: Imagesorter::Categorizers::FileStatCategorizer
- Inherits:
-
Object
- Object
- Imagesorter::Categorizers::FileStatCategorizer
- Defined in:
- lib/imagesorter/categorizers/file_stat_categorizer.rb
Instance Method Summary collapse
-
#initialize(stat) ⇒ FileStatCategorizer
constructor
A new instance of FileStatCategorizer.
- #process(file) ⇒ Object
Constructor Details
#initialize(stat) ⇒ FileStatCategorizer
Returns a new instance of FileStatCategorizer.
6 7 8 |
# File 'lib/imagesorter/categorizers/file_stat_categorizer.rb', line 6 def initialize(stat) @stat = stat end |
Instance Method Details
#process(file) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/imagesorter/categorizers/file_stat_categorizer.rb', line 10 def process(file) time = file.file.send(@stat) return nil if time.nil? file.time = time end |