Class: Parser::IPA
Instance Method Summary collapse
- #app ⇒ Object
- #app_path ⇒ Object
- #cleanup ⇒ Object
- #has_metadata? ⇒ Boolean
-
#initialize(path) ⇒ IPA
constructor
A new instance of IPA.
- #metadata ⇒ Object
- #metadata_path ⇒ Object
- #release_type ⇒ Object
Constructor Details
#initialize(path) ⇒ IPA
Returns a new instance of IPA.
22 23 24 |
# File 'lib/fir/patches/parser_patch.rb', line 22 def initialize(path) @path = path end |
Instance Method Details
#app ⇒ Object
26 27 28 |
# File 'lib/fir/patches/parser_patch.rb', line 26 def app @app ||= App.new(app_path) end |
#app_path ⇒ Object
30 31 32 |
# File 'lib/fir/patches/parser_patch.rb', line 30 def app_path @app_path ||= Dir.glob(File.join(contents, 'Payload', '*.app')).first end |
#cleanup ⇒ Object
34 35 36 37 38 |
# File 'lib/fir/patches/parser_patch.rb', line 34 def cleanup return unless @contents FileUtils.rm_rf(@contents) @contents = nil end |
#has_metadata? ⇒ Boolean
45 46 47 |
# File 'lib/fir/patches/parser_patch.rb', line 45 def File.file? end |
#metadata ⇒ Object
40 41 42 43 |
# File 'lib/fir/patches/parser_patch.rb', line 40 def return unless @metadata ||= CFPropertyList.native_types(CFPropertyList::List.new(file: ).value) end |
#metadata_path ⇒ Object
49 50 51 |
# File 'lib/fir/patches/parser_patch.rb', line 49 def @metadata_path ||= File.join(@contents, 'iTunesMetadata.plist') end |
#release_type ⇒ Object
53 54 55 |
# File 'lib/fir/patches/parser_patch.rb', line 53 def release_type ? 'store' : 'adhoc' end |