Class: Cask::Artifact::Moved Private

Inherits:
Relocated show all
Defined in:
cask/artifact/moved.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.

Superclass for all artifacts that are installed by moving them to the target location.

Instance Attribute Summary

Attributes inherited from AbstractArtifact

#cask

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Relocated

from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a

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::Relocated

Class Method Details

.english_descriptionString

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.

Returns:



12
13
14
# File 'cask/artifact/moved.rb', line 12

def self.english_description
  "#{english_name}s"
end

Instance Method Details

#install_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.



16
17
18
# File 'cask/artifact/moved.rb', line 16

def install_phase(**options)
  move(**options)
end

#summarize_installedObject

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.



24
25
26
27
28
29
30
# File 'cask/artifact/moved.rb', line 24

def summarize_installed
  if target.exist?
    "#{printable_target} (#{target.abv})"
  else
    Formatter.error(printable_target, label: "Missing #{self.class.english_name}")
  end
end

#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.



20
21
22
# File 'cask/artifact/moved.rb', line 20

def uninstall_phase(**options)
  move_back(**options)
end