Class: Imagesorter::SortableFile

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/imagesorter/sortable_file.rb

Overview

Base for every sortable entity

Instance Method Summary collapse

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