Class: Ccdk::GzipLogFile
Overview
A Gzipped version of the log file All behavior is the same as a standard log file except it assumes the content has been gzipped
Instance Method Summary collapse
-
#initialize(file_name) ⇒ GzipLogFile
constructor
Create a new GzipLogFile.
Methods inherited from LogFile
#close, #each_block, #next_block, open
Constructor Details
#initialize(file_name) ⇒ GzipLogFile
Create a new GzipLogFile. The file name passed must be gzipped
Parameters
-
file_name
- The name of the gzipped log file to open
101 102 103 |
# File 'lib/ccdk/log_file.rb', line 101 def initialize(file_name) @fh = Zlib::GzipReader.new(File.open(file_name, 'r')) end |