Class: DependentsMessage
- 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_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #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.
18 19 20 21 22 |
# File 'dependents_message.rb', line 18 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.
15 16 17 |
# File 'dependents_message.rb', line 15 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.
15 16 17 |
# File 'dependents_message.rb', line 15 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.
12 13 14 |
# File 'dependents_message.rb', line 12 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.
25 26 27 28 29 30 31 32 |
# File 'dependents_message.rb', line 25 def output ofail <<~EOS Refusing to uninstall #{Utils::Text.to_sentence(reqs)} because #{reqs.one? ? "it" : "they"} #{are_required_by_deps}. You can override this and force removal with: #{sample_command} EOS end |