Sha256: a55365060104936847c188b036c5f9c589b5a9ddc172c193b57a426258570fed

Contents?: true

Size: 314 Bytes

Versions: 1

Compression:

Stored size: 314 Bytes

Contents

module Chkex
  class FileHandler
    def self.read_list(file_path)
      # file_path is actually a URL, not a file, don't try to open it
      return file_path unless File.file?(file_path)

      raise Chkex::FileNotFound unless File.exist?(file_path)

      File.read(file_path).split("\n").uniq
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chkex-0.1.1 lib/chkex/file_handler.rb