Class: UnpackStrategy::Dmg

Inherits:
Object
  • Object
show all
Includes:
UnpackStrategy
Defined in:
brew/Library/Homebrew/unpack_strategy/dmg.rb

Instance Attribute Summary

Attributes included from UnpackStrategy

#merge_xattrs, #path

Class Method Summary collapse

Methods included from UnpackStrategy

#dependencies, detect, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize

Class Method Details

.can_extract?(path) ⇒ Boolean

Returns:

  • (Boolean)


108
109
110
111
112
113
114
# File 'brew/Library/Homebrew/unpack_strategy/dmg.rb', line 108

def self.can_extract?(path)
  imageinfo = system_command("hdiutil",
                             args:         ["imageinfo", path],
                             print_stderr: false).stdout

  !imageinfo.empty?
end

.extensionsObject



104
105
106
# File 'brew/Library/Homebrew/unpack_strategy/dmg.rb', line 104

def self.extensions
  [".dmg"]
end