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.
18 19 20 21 |
# File 'lib/avm/data/package/load.rb', line 18 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.
16 17 18 |
# File 'lib/avm/data/package/load.rb', line 16 def source_path @source_path end |
Instance Method Details
#extract_packages_to_build_directory ⇒ Object
30 31 32 |
# File 'lib/avm/data/package/load.rb', line 30 def extract_packages_to_build_directory ::Minitar.unpack(source_path.to_path, build_directory.to_path) end |
#result ⇒ Object
23 24 25 26 27 28 |
# File 'lib/avm/data/package/load.rb', line 23 def result on_build_directory do extract_packages_to_build_directory package.load_units_from_directory(build_directory, selected_units) end end |