organize_photos.rb
# collate an array of files into a hash of dest_dir => file
collate an array of files into a hash of dest_dir => file
collate an array of files into a hash of dest_dir = > file
def collate(strategy, dated_files)
  dated_files.each_with_object({}) do |f, acc|
    key = yield(strategy.date_from_image(f))
    acc[key] = [] unless acc[key]
    acc[key] << f
  end
end
def collate ( strategy , dated_files ) dated_files . each_with_object ( { } ) do | f , acc | key = yield ( strategy . date_from_image ( f ) ) acc [ key ] = [ ] unless acc [ key ] acc [ key ] << f end end
collate an array of files into a hash of dest_dir => file
collate an array of files into a hash of dest_dir = > file
strategy
<not_specific>
dated_files
<not_specific>