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
#odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled
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.
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.
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.
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.
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 |