2018-07-16 09:16:50 +02:00

13 lines
267 B
Ruby

require "hbc/container/naked"
module Hbc
class Container
class Pkg < Naked
def self.can_extract?(path:, magic_number:)
path.extname.match?(/\A.m?pkg\Z/) &&
(path.directory? || magic_number.match?(/\Axar!/n))
end
end
end
end