class IESD::DMG
OS X Installer DMG
Public Class Methods
new(url)
click to toggle source
Initialize a new installer DMG.
Returns an installer DMG if the type of the installer is detected, otherwise nil.
# File lib/iesd/InstallESD.rb, line 28 def self.new url i = nil if HDIUtil::validate url HDIUtil::DMG.new(url).show { |mountpoint| oh1 "Detecting #{url}" case when (File.exist? File.join(mountpoint, *%w[ .IABootFiles ])) i = IESD::DMG::InstallOSX.new url when (File.exist? File.join(mountpoint, *%w[ System Installation ])) i = IESD::DMG::BaseSystem.new url when (File.exist? File.join(mountpoint, *%w[ BaseSystem.dmg ])) i = IESD::DMG::InstallESD.new url else raise "unknown type" end puts "Detected: #{i.class.name.split("::").last}" } end i end