Class: Lagunitas::IPA
- Inherits:
-
Object
- Object
- Lagunitas::IPA
- Defined in:
- lib/lagunitas/ipa.rb
Overview
Representation of an IPA file
Instance Method Summary collapse
- #app ⇒ Object
- #app_path ⇒ Object
- #cleanup ⇒ Object
-
#initialize(path) ⇒ IPA
constructor
A new instance of IPA.
Constructor Details
#initialize(path) ⇒ IPA
Returns a new instance of IPA.
10 11 12 13 |
# File 'lib/lagunitas/ipa.rb', line 10 def initialize(path) @path = path @contents = nil end |
Instance Method Details
#app ⇒ Object
15 16 17 |
# File 'lib/lagunitas/ipa.rb', line 15 def app @app ||= App.new(app_path) end |
#app_path ⇒ Object
19 20 21 |
# File 'lib/lagunitas/ipa.rb', line 19 def app_path @app_path ||= Dir.glob(File.join(contents, 'Payload', '*.app')).first end |
#cleanup ⇒ Object
23 24 25 26 27 28 |
# File 'lib/lagunitas/ipa.rb', line 23 def cleanup return unless @contents FileUtils.rm_rf(@contents) @contents = nil end |