Sha256: a87c0f0daf20d7797dca094b0affc626a7c4289c6275346c7b4d2221a2d42458
Contents?: true
Size: 514 Bytes
Versions: 19
Compression:
Stored size: 514 Bytes
Contents
# frozen_string_literal: true require "attr_extras" module Renalware module UKRDC module Incoming class FileList pattr_initialize [pattern: "*.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
19 entries across 19 versions & 1 rubygems