Class: VpsbClient::Datafiles::LogfileDecompressor

Inherits:
Object
  • Object
show all
Defined in:
lib/vpsb_client/datafiles/logfile_decompressor.rb

Defined Under Namespace

Classes: NotFoundError

Constant Summary collapse

UNLIMITED_ROTATION_ID =
10000

Instance Method Summary collapse

Constructor Details

#initialize(orig_path, target_path, options = {}) ⇒ LogfileDecompressor

Returns a new instance of LogfileDecompressor.

Raises:



8
9
10
11
12
13
14
# File 'lib/vpsb_client/datafiles/logfile_decompressor.rb', line 8

def initialize(orig_path, target_path, options = {})
  raise NotFoundError, "#{orig_path} is not a directory" unless File.directory?(orig_path)
  @orig_path = orig_path
  @target_path = target_path
  @filename_prefix = options.fetch(:filename_prefix, '*')
  @max_rotation_id = options.fetch(:max_rotation_id, UNLIMITED_ROTATION_ID)
end

Instance Method Details

#runObject



16
17
18
# File 'lib/vpsb_client/datafiles/logfile_decompressor.rb', line 16

def run
  unzip
end