Class: Renalware::UKRDC::Incoming::FileList

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/ukrdc/incoming/file_list.rb

Instance Method Summary collapse

Instance Method Details

#each_fileObject

Helper which yields each file in the incoming folder.



12
13
14
15
16
17
# File 'app/models/renalware/ukrdc/incoming/file_list.rb', line 12

def each_file
  Dir.glob(paths.incoming.join(pattern)).sort.each do |filepath|
    filename = File.basename(filepath)
    yield(Pathname(filepath), filename) if block_given?
  end
end