Class: Chkex::FileHandler
- Inherits:
-
Object
- Object
- Chkex::FileHandler
- Defined in:
- lib/chkex/file_handler.rb
Class Method Summary collapse
Class Method Details
.read_list(file_path) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/chkex/file_handler.rb', line 3 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 |