Class: VpsbClient::Datafiles::LogfileDecompressor
- Inherits:
-
Object
- Object
- VpsbClient::Datafiles::LogfileDecompressor
- 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
-
#initialize(orig_path, target_path, options = {}) ⇒ LogfileDecompressor
constructor
A new instance of LogfileDecompressor.
- #run ⇒ Object
Constructor Details
#initialize(orig_path, target_path, options = {}) ⇒ LogfileDecompressor
Returns a new instance of LogfileDecompressor.
8 9 10 11 12 13 14 |
# File 'lib/vpsb_client/datafiles/logfile_decompressor.rb', line 8 def initialize(orig_path, target_path, = {}) raise NotFoundError, "#{orig_path} is not a directory" unless File.directory?(orig_path) @orig_path = orig_path @target_path = target_path @filename_prefix = .fetch(:filename_prefix, '*') @max_rotation_id = .fetch(:max_rotation_id, UNLIMITED_ROTATION_ID) end |
Instance Method Details
#run ⇒ Object
16 17 18 |
# File 'lib/vpsb_client/datafiles/logfile_decompressor.rb', line 16 def run unzip end |