Class: ComplianceEngine::EnvironmentLoader::Zip
- Inherits:
-
ComplianceEngine::EnvironmentLoader
- Object
- ComplianceEngine::EnvironmentLoader
- ComplianceEngine::EnvironmentLoader::Zip
- Defined in:
- lib/compliance_engine/environment_loader/zip.rb
Overview
Load compliance engine data from a zip file containing a Puppet environment
Instance Attribute Summary
Attributes inherited from ComplianceEngine::EnvironmentLoader
Instance Method Summary collapse
-
#initialize(path, root: '/'.dup) ⇒ Zip
constructor
Initialize a ComplianceEngine::EnvironmentLoader::Zip object from a zip file and an optional root directory.
Constructor Details
#initialize(path, root: '/'.dup) ⇒ Zip
Initialize a ComplianceEngine::EnvironmentLoader::Zip object from a zip file and an optional root directory.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/compliance_engine/environment_loader/zip.rb', line 14 def initialize(path, root: '/'.dup) @modulepath = path ::Zip::File.open(path) do |zipfile| dir = zipfile.dir file = zipfile.file super(root, fileclass: file, dirclass: dir) end end |