Class: MooTool::IPSW

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

Overview

Represents a single IPSW package

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ IPSW

Returns a new instance of IPSW.



13
14
15
16
17
18
19
20
21
# File 'lib/mootool/models/ipsw.rb', line 13

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.



11
12
13
# File 'lib/mootool/models/ipsw.rb', line 11

def manifest
  @manifest
end