Spec-Zone.ru › Homebrew

Class: Cask::Artifact::Moved Private

Inherits:
Relocated
  • Object
  • AbstractArtifact
  • Relocated
  • Cask::Artifact::Moved
show all
Includes:
OS::Linux::Cask::Artifact::Moved, OS::Mac::Cask::Artifact::Moved
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.

Direct Known Subclasses

App, Artifact, AudioUnitPlugin, Colorpicker, Dictionary, Font, InputMethod, InternetPlugin, KeyboardLayout, Mdimporter, Prefpane, Qlplugin, ScreenSaver, Service, Suite, Vst3Plugin, VstPlugin

Constant Summary

Constants inherited from AbstractArtifact

AbstractArtifact::DirectivesType

Instance Attribute Summary

Attributes inherited from AbstractArtifact

#cask

Class Method Summary collapse

  • .english_description ⇒ String private

Instance Method Summary collapse

  • #install_phase(adopt: false, auto_updates: false, force: false, verbose: false, predecessor: nil, successor: nil, reinstall: false, command: SystemCommand) ⇒ void private
  • #summarize_installed ⇒ String private
  • #uninstall_phase(skip: false, force: false, adopt: false, verbose: false, successor: nil, upgrade: false, reinstall: false, command: SystemCommand) ⇒ void private

Methods inherited from Relocated

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

Methods included from OS::Linux::Cask::Artifact::Relocated

#add_altname_metadata

Methods inherited from AbstractArtifact

#cask_sandbox, #cask_sandbox_command, #config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #run_cask_sandbox, #sort_order, #staged_path_join_executable, #summarize, #to_args

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_upgradable, #pretty_warning

Constructor Details

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

Class Method Details

.english_description ⇒ String

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:

  • (String)


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

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

Instance Method Details

#install_phase(adopt: false, auto_updates: false, force: false, verbose: false, predecessor: nil, successor: nil, reinstall: false, command: SystemCommand) ⇒ 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:

  • adopt (Boolean) (defaults to: false)
  • auto_updates (Boolean, nil) (defaults to: false)
  • force (Boolean) (defaults to: false)
  • verbose (Boolean) (defaults to: false)
  • predecessor (Cask, nil) (defaults to: nil)
  • successor (Cask, nil) (defaults to: nil)
  • reinstall (Boolean) (defaults to: false)
  • command (T.class_of(SystemCommand)) (defaults to: SystemCommand)


28
29
30
31
# File 'cask/artifact/moved.rb', line 28

def install_phase(adopt: false, auto_updates: false, force: false, verbose: false, predecessor: nil,
                  successor: nil, reinstall: false, command: SystemCommand)
  move(adopt:, auto_updates:, force:, verbose:, predecessor:, successor:, reinstall:, command:)
end

#summarize_installed ⇒ String

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:

  • (String)


51
52
53
54
55
56
57
# File 'cask/artifact/moved.rb', line 51

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(skip: false, force: false, adopt: false, verbose: false, successor: nil, upgrade: false, reinstall: false, command: SystemCommand) ⇒ 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:

  • skip (Boolean) (defaults to: false)
  • force (Boolean) (defaults to: false)
  • adopt (Boolean) (defaults to: false)
  • verbose (Boolean) (defaults to: false)
  • successor (Cask, nil) (defaults to: nil)
  • upgrade (Boolean) (defaults to: false)
  • reinstall (Boolean) (defaults to: false)
  • command (T.class_of(SystemCommand)) (defaults to: SystemCommand)


45
46
47
48
# File 'cask/artifact/moved.rb', line 45

def uninstall_phase(skip: false, force: false, adopt: false, verbose: false, successor: nil, upgrade: false,
                    reinstall: false, command: SystemCommand)
  move_back(skip:, force:, adopt:, successor:, command:)
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Cask/Artifact/Moved.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API