Class: Avm::Data::Package::Load
- Inherits:
-
BasePerformer
- Object
- BasePerformer
- Avm::Data::Package::Load
- Includes:
- BuildDirectory
- Defined in:
- lib/avm/data/package/load.rb
Instance Attribute Summary collapse
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
Instance Method Summary collapse
- #extract_packages_to_build_directory ⇒ Object
-
#initialize(package, source_path, options = {}) ⇒ Load
constructor
A new instance of Load.
- #result ⇒ Object
Methods inherited from BasePerformer
#excludes, #includes, #selected_units
Constructor Details
#initialize(package, source_path, options = {}) ⇒ Load
Returns a new instance of Load.
15 16 17 18 |
# File 'lib/avm/data/package/load.rb', line 15 def initialize(package, source_path, = {}) super(package, ) @source_path = source_path.to_pathname end |
Instance Attribute Details
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path.
13 14 15 |
# File 'lib/avm/data/package/load.rb', line 13 def source_path @source_path end |
Instance Method Details
#extract_packages_to_build_directory ⇒ Object
27 28 29 |
# File 'lib/avm/data/package/load.rb', line 27 def extract_packages_to_build_directory ::Minitar.unpack(source_path.to_path, build_directory.to_path) end |
#result ⇒ Object
20 21 22 23 24 25 |
# File 'lib/avm/data/package/load.rb', line 20 def result on_build_directory do extract_packages_to_build_directory package.load_units_from_directory(build_directory, selected_units) end end |