Class: DockerSync::Dependencies::PackageManager::Yum

Inherits:
Base
  • Object
show all
Defined in:
lib/docker-sync/dependencies/package_managers/yum.rb

Constant Summary collapse

YUM_NOT_AVAILABLE =
'Yum 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

#package

Class Method Summary collapse

Methods inherited from Base

#initialize, install_package

Constructor Details

This class inherits a constructor from DockerSync::Dependencies::PackageManager::Base

Class Method Details

.available?Boolean

Returns:

  • (Boolean)

7
8
9
10
# File 'lib/docker-sync/dependencies/package_managers/yum.rb', line 7

def self.available?
  return @available if defined? @available
  @available = find_executable0('yum')
end

.ensure!Object

Raises:


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

def self.ensure!
  raise(YUM_NOT_AVAILABLE) unless available?
end