Class: Lagunitas::IPA
- Inherits:
-
Object
- Object
- Lagunitas::IPA
- Defined in:
- lib/lagunitas.ext.rb,
lib/lagunitas.patch.rb
Instance Method Summary collapse
Instance Method Details
#app ⇒ Object
23 24 25 |
# File 'lib/lagunitas.patch.rb', line 23 def app @app ||= App.new app_path, root_path end |
#contents ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/lagunitas.patch.rb', line 26 def contents @contents ||= begin tmp_path = "tmp/lagunitas-#{SecureRandom.hex}" Zip::ZipFile.open @path do |zip_file| zip_file.each do |f| f_path = File.join tmp_path, f.name FileUtils.mkdir_p File.dirname f_path zip_file.extract f, f_path unless File.exist? f_path end end tmp_path end end |
#root_path ⇒ Object
52 53 54 |
# File 'lib/lagunitas.ext.rb', line 52 def root_path contents end |