Class: Cask::Artifact::Uninstall Private

Inherits:
AbstractUninstall show all
Defined in:
cask/artifact/uninstall.rb

Overview

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.

Artifact corresponding to the uninstall stanza.

Constant Summary

Constants inherited from AbstractUninstall

AbstractUninstall::ORDERED_DIRECTIVES

Instance Attribute Summary

Attributes inherited from AbstractUninstall

#directives

Attributes inherited from AbstractArtifact

#cask

Instance Method Summary collapse

Methods inherited from AbstractUninstall

from_args, #initialize, #summarize, #to_h

Methods included from SystemCommand::Mixin

#system_command, #system_command!

Methods inherited from AbstractArtifact

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args

Methods included from Attrable

#attr_predicate, #attr_rw

Constructor Details

This class inherits a constructor from Cask::Artifact::AbstractUninstall

Instance Method Details

#post_uninstall_phase(**options) ⇒ Object

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.



26
27
28
# File 'cask/artifact/uninstall.rb', line 26

def post_uninstall_phase(**options)
  dispatch_uninstall_directive(:rmdir, **options)
end

#uninstall_phase(upgrade: false, reinstall: false, **options) ⇒ Object

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.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'cask/artifact/uninstall.rb', line 12

def uninstall_phase(upgrade: false, reinstall: false, **options)
  filtered_directives = ORDERED_DIRECTIVES.filter do |directive_sym|
    next false if directive_sym == :rmdir

    next false if (upgrade || reinstall) && UPGRADE_REINSTALL_SKIP_DIRECTIVES.include?(directive_sym)

    true
  end

  filtered_directives.each do |directive_sym|
    dispatch_uninstall_directive(directive_sym, **options)
  end
end