Spec-Zone.ru › Homebrew

Class: DependentsMessage

Inherits:
Object
  • Object
  • DependentsMessage
show all
Includes:
Utils::Output::Mixin
Defined in:
dependents_message.rb

Instance Attribute Summary collapse

  • #deps ⇒ Array<String> readonly private
  • #named_args ⇒ Array<String> readonly private
  • #reqs ⇒ Array<String, Keg> readonly private

Instance Method Summary collapse

  • #initialize(requireds, dependents, named_args: []) ⇒ void constructor private
  • #output ⇒ void private

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(requireds, dependents, named_args: []) ⇒ 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:

  • requireds (Array<String, Keg>)
  • dependents (Array<String>)
  • named_args (Array<String>) (defaults to: [])


16
17
18
19
20
# File 'dependents_message.rb', line 16

def initialize(requireds, dependents, named_args: [])
  @reqs = requireds
  @deps = dependents
  @named_args = named_args
end

Instance Attribute Details

#deps ⇒ Array<String> (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:

  • (Array<String>)


13
14
15
# File 'dependents_message.rb', line 13

def deps
  @deps
end

#named_args ⇒ Array<String> (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:

  • (Array<String>)


13
14
15
# File 'dependents_message.rb', line 13

def named_args
  @named_args
end

#reqs ⇒ Array<String, Keg> (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:

  • (Array<String, Keg>)


10
11
12
# File 'dependents_message.rb', line 10

def reqs
  @reqs
end

Instance Method Details

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



23
24
25
26
27
28
29
30
# File 'dependents_message.rb', line 23

def output
  ofail <<~EOS
    Refusing to uninstall #{reqs.to_sentence}    because #{reqs.one? ? "it" : "they"}#{are_required_by_deps}.
    You can override this and force removal with:
#{sample_command}  EOS
end

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

Spec-Zone.ru

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