Class: Pkgman::Repositories::Local
- Inherits:
-
Object
- Object
- Pkgman::Repositories::Local
- Defined in:
- lib/pkgman/repositories/local.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(target, repository, package) ⇒ Local
constructor
A new instance of Local.
Constructor Details
#initialize(target, repository, package) ⇒ Local
Returns a new instance of Local.
5 6 7 8 9 |
# File 'lib/pkgman/repositories/local.rb', line 5 def initialize(target, repository, package) @target = target @repository = repository @package = package end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 |
# File 'lib/pkgman/repositories/local.rb', line 11 def execute dst = File.(@repository['path']) FileUtils.mkpath(dst) @target.download(@package.path, dst) end |