Class: Pkgman::Repositories::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/pkgman/repositories/local.rb

Instance Method Summary collapse

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

#executeObject



11
12
13
14
15
# File 'lib/pkgman/repositories/local.rb', line 11

def execute
  dst = File.expand_path(@repository['path'])
  FileUtils.mkpath(dst)
  @target.download(@package.path, dst)
end