Class: Gonzui::TarBzip2Extractor
- Inherits:
-
AbstractExtractor
- Object
- AbstractExtractor
- Gonzui::TarBzip2Extractor
- Defined in:
- lib/gonzui/extractor.rb
Instance Attribute Summary
Attributes included from TemporaryDirectoryUtil
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AbstractExtractor
Methods included from TemporaryDirectoryUtil
#clean_temporary_directory, #prepare_temporary_directory, #set_temporary_directory
Methods included from Util
assert, assert_equal, assert_equal_all, assert_non_nil, assert_not_reached, benchmark, command_exist?, commify, eprintf, format_bytes, program_name, protect_from_signals, require_command, set_verbosity, shell_escape, unix?, vprintf, windows?, wprintf
Constructor Details
This class inherits a constructor from Gonzui::AbstractExtractor
Class Method Details
.commands ⇒ Object
182 183 184 |
# File 'lib/gonzui/extractor.rb', line 182 def self.commands ["tar", "bzip2"] end |
.extnames ⇒ Object
186 187 188 |
# File 'lib/gonzui/extractor.rb', line 186 def self.extnames [".tar.bz2"] end |
Instance Method Details
#do_extract ⇒ Object
190 191 192 193 194 |
# File 'lib/gonzui/extractor.rb', line 190 def do_extract command_line = sprintf("bzip2 -d -c %s | tar xf -", shell_escape(File.(@file_name))) run_extract_command(command_line, @file_name) end |