Spec-Zone.ru › Homebrew

Class: Cask::Artifact::Pkg Private

Inherits:
AbstractArtifact
  • Object
  • AbstractArtifact
  • Cask::Artifact::Pkg
show all
Defined in:
cask/artifact/pkg.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 pkg stanza.

Constant Summary

Constants inherited from AbstractArtifact

AbstractArtifact::DirectivesType

Instance Attribute Summary collapse

  • #path ⇒ Pathname readonly private
  • #stanza_options ⇒ Hash{Symbol => T.untyped} readonly private

Attributes inherited from AbstractArtifact

#cask

Class Method Summary collapse

  • .from_args(cask, path, **stanza_options) ⇒ T.attached_class private

Instance Method Summary collapse

  • #initialize(cask, path, **stanza_options) ⇒ void constructor private
  • #install_phase(command: SystemCommand, verbose: false, **_options) ⇒ void private
  • #summarize ⇒ String private

Methods inherited from AbstractArtifact

#cask_sandbox, #cask_sandbox_command, #config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #run_cask_sandbox, #sort_order, #staged_path_join_executable, #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

#initialize(cask, path, **stanza_options) ⇒ 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.

Parameters:

  • cask (Cask)
  • path (String, Pathname)
  • stanza_options (T.untyped)


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

def initialize(cask, path, **stanza_options)
  super
  @path = T.let(cask.staged_path.join(path), Pathname)
  @stanza_options = T.let(stanza_options, T::Hash[Symbol, T.untyped])
end

Instance Attribute Details

#path ⇒ Pathname (readonly)

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:

  • (Pathname)


15
16
17
# File 'cask/artifact/pkg.rb', line 15

def path
  @path
end

#stanza_options ⇒ Hash{Symbol => T.untyped} (readonly)

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:

  • (Hash{Symbol => T.untyped})


18
19
20
# File 'cask/artifact/pkg.rb', line 18

def stanza_options
  @stanza_options
end

Class Method Details

.from_args(cask, path, **stanza_options) ⇒ T.attached_class

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.

Parameters:

  • cask (Cask)
  • path (String, Pathname)
  • stanza_options (T.untyped)

Returns:

  • (T.attached_class)


21
22
23
24
25
# File 'cask/artifact/pkg.rb', line 21

def self.from_args(cask, path, **stanza_options)
  # odeprecated: `allow_untrusted` disables certificate verification and is being removed.
  stanza_options.assert_valid_keys(:allow_untrusted, :choices)
  new(cask, path, **stanza_options)
end

Instance Method Details

#install_phase(command: SystemCommand, verbose: false, **_options) ⇒ 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:

  • command (T.class_of(SystemCommand)) (defaults to: SystemCommand)
  • verbose (Boolean) (defaults to: false)
  • _options (T.anything)


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

def install_phase(command: SystemCommand, verbose: false, **_options)
  run_installer(command:, verbose:)
end

#summarize ⇒ 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)


35
36
37
# File 'cask/artifact/pkg.rb', line 35

def summarize
  path.relative_path_from(cask.staged_path).to_s
end

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

Spec-Zone.ru

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