Class: DockerSync::Dependencies::PackageManager::Brew

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

Constant Summary collapse

BREW_NOT_AVAILABLE =
'Brew is not installed. Please install it (see https://brew.sh) and try again.'.freeze

Constants inherited from Base

DockerSync::Dependencies::PackageManager::Base::DID_NOT_INSTALL_PACKAGE, DockerSync::Dependencies::PackageManager::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/brew.rb', line 7

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

.ensure!Object

Raises:


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

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