Class: Cask::Uninstall Private

Inherits:
Object show all
Extended by:
Utils::Output::Mixin
Defined in:
cask/uninstall.rb

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Class Method Summary collapse

Methods included from Utils::Output::Mixin

odebug, odeprecated, odie, odisabled, ofail, oh1, oh1_title, ohai, ohai_title, onoe, opoo, opoo_outside_github_actions, pretty_duration, pretty_installed, pretty_outdated, pretty_uninstalled

Class Method Details

.uninstall_casks(*casks, binaries: false, force: false, verbose: false) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.

Parameters:

  • casks (::Cask::Cask)
  • binaries (Boolean) (defaults to: false)
  • force (Boolean) (defaults to: false)
  • verbose (Boolean) (defaults to: false)
 11 12 13 14 15 16 17 18 19 20 21
# File 'cask/uninstall.rb', line 11 def self.uninstall_casks(*casks, binaries: false, force: false, verbose: false) require "cask/installer" casks.each do |cask| odebug "Uninstalling Cask #{cask}" raise CaskNotInstalledError, cask if !cask.installed? && !force Installer.new(cask, binaries:, force:, verbose:).uninstall end end