Class: DockerSync::Dependencies::PackageManager::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/docker-sync/dependencies/package_managers/base.rb

Direct Known Subclasses

Apt, Brew, None, Pkg, Yum

Constant Summary collapse

DID_NOT_INSTALL_PACKAGE =
'Did not install required package. Please install it manually and try again.'.freeze
FAILED_TO_INSTALL_PACKAGE =
'Failed to install required package. Please install it manually and try again.'.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(package) ⇒ Base

Returns a new instance of Base.



20
21
22
# File 'lib/docker-sync/dependencies/package_managers/base.rb', line 20

def initialize(package)
  @package = package
end

Instance Attribute Details

#packageObject (readonly)

Returns the value of attribute package.



13
14
15
# File 'lib/docker-sync/dependencies/package_managers/base.rb', line 13

def package
  @package
end

Class Method Details

.install_package(*args) ⇒ Object



15
16
17
18
# File 'lib/docker-sync/dependencies/package_managers/base.rb', line 15

def self.install_package(*args)
  ensure!
  new(*args).send(:install_package)
end