Class: DockerSync::Dependencies::PackageManager::Pkg
- Defined in:
- lib/docker-sync/dependencies/package_managers/pkg.rb
Constant Summary collapse
- PKG_NOT_AVAILABLE =
'PKG is not installed. Please install it and try again.'.freeze
Constants inherited from Base
Base::DID_NOT_INSTALL_PACKAGE, Base::FAILED_TO_INSTALL_PACKAGE
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from DockerSync::Dependencies::PackageManager::Base
Class Method Details
.available? ⇒ Boolean
7 8 9 10 |
# File 'lib/docker-sync/dependencies/package_managers/pkg.rb', line 7 def self.available? return @available if defined? @available @available = find_executable0('pkg') end |
.ensure! ⇒ Object
12 13 14 |
# File 'lib/docker-sync/dependencies/package_managers/pkg.rb', line 12 def self.ensure! raise(PKG_NOT_AVAILABLE) unless available? end |