Class: MooTool::Models::IPSW

Inherits:
Object
  • Object
show all
Defined in:
lib/mootool/models/ipsw.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ IPSW

Returns a new instance of IPSW.



9
10
11
12
13
14
15
16
17
# File 'lib/mootool/models/ipsw.rb', line 9

def initialize(file)
  @file = file
  @zip = Zip::File.open(file)
  manifest = @zip.find_entry('BuildManifest.plist')

  raise 'Invalid IPSW, does not contain BuildManifest.plist' unless manifest

  @manifest = Plist.parse_xml manifest.get_input_stream.read
end

Instance Attribute Details

#manifestObject (readonly)

Returns the value of attribute manifest.



7
8
9
# File 'lib/mootool/models/ipsw.rb', line 7

def manifest
  @manifest
end