require 'chrysalis/ar/tar' module Chrysalis module Ar # Implements support for extracting tar archives compressed with bzip2 # compression. # # Archives of this type are identified by the file extension .tar.bz2. class TarBz2Archive < TarArchive EXTENSION = ".tar.bz2".freeze def self.extracts?(path) path.end? EXTENSION end protected def flags "xjvf" end def extracts_into return @extracts_into if @extracts_into Pathname.new(@path).basename(EXTENSION) end end end end