Method: LogTool::Parser.open_log
- Defined in:
- lib/logtool/parser.rb
.open_log(file_path) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/logtool/parser.rb', line 6 def self.open_log(file_path) yield File.open(file_path) rescue Errno::ENOENT puts "#{file_path}: No such file or directory" exit 1 rescue Errno::EACCES puts "#{file_path}: Permission denied" exit 2 end |