Class: Imagesorter::SortableFile
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Imagesorter::SortableFile
- Defined in:
- lib/imagesorter/sortable_file.rb
Overview
Base for every sortable entity
Instance Method Summary collapse
-
#initialize(path) ⇒ SortableFile
constructor
A new instance of SortableFile.
- #process!(processor) ⇒ Object
Constructor Details
#initialize(path) ⇒ SortableFile
Returns a new instance of SortableFile.
6 7 8 |
# File 'lib/imagesorter/sortable_file.rb', line 6 def initialize(path) super(file: File.new(path)) end |
Instance Method Details
#process!(processor) ⇒ Object
10 11 12 |
# File 'lib/imagesorter/sortable_file.rb', line 10 def process!(processor) processor.process(self) end |