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

Version Path
renalware-core-2.0.159 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.158 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.157 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.156 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.155 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.153 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.152 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.151 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.149 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.148 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.147 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.146 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.145 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.144 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.143 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.142 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.141 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.140 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.139 app/models/renalware/ukrdc/incoming/file_list.rb
renalware-core-2.0.138 app/models/renalware/ukrdc/incoming/file_list.rb