class Pione::Package::ArchivePackageReader
ArchivePackageReader
is a reader for PPG pakage.
Public Class Methods
new(location)
click to toggle source
# File lib/pione/package/package-reader.rb, line 166 def initialize(location) @location = location # arbitrary data location end
Public Instance Methods
read()
click to toggle source
# File lib/pione/package/package-reader.rb, line 170 def read # copy to local, we cannot use Location::DataLocation#local in here # because the method don't keep filename local_location = Location[Temppath.mkdir] + @location.basename @location.copy(local_location) # cache the package digest = PackageCache.cache(local_location) return PackageHandler.new(PackageCache.directory_cache(digest), digest: digest) end