Class: Ccdk::GzipLogFile

Inherits:
LogFile show all
Defined in:
lib/ccdk/log_file.rb

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

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