Class: UnpackStrategy::Lha
- Inherits:
-
Object
- Object
- UnpackStrategy::Lha
- Includes:
- UnpackStrategy
- Defined in:
- unpack_strategy/lha.rb
Overview
Strategy for unpacking LHa archives.
Instance Attribute Summary
Attributes included from UnpackStrategy
Class Method Summary collapse
Instance Method Summary collapse
Methods included from UnpackStrategy
detect, #each_directory, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize
Methods included from SystemCommand::Mixin
#system_command, #system_command!
Class Method Details
.can_extract?(path) ⇒ Boolean
16 17 18 |
# File 'unpack_strategy/lha.rb', line 16 def self.can_extract?(path) path.magic_number.match?(/\A..-(lh0|lh1|lz4|lz5|lzs|lh\\40|lhd|lh2|lh3|lh4|lh5)-/n) end |
Instance Method Details
#dependencies ⇒ Object
20 21 22 |
# File 'unpack_strategy/lha.rb', line 20 def dependencies @dependencies ||= [Formula["lha"]] end |