Sha256: 86067104d4bd7f65450c29e0454809612aa1b39f6746ba8606fe2c449135fabb
Contents?: true
Size: 520 Bytes
Versions: 25
Compression:
Stored size: 520 Bytes
Contents
# frozen_string_literal: true require "attr_extras" module Renalware module UKRDC module Incoming class FileList pattr_initialize [pattern: "survey*.xml", paths: Paths.new] # Helper which yields each file in the incoming folder. 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 end end end end
Version data entries
25 entries across 25 versions & 1 rubygems