Class: Homebrew::Uninstall::DependentsMessage Private

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

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: []) ⇒ DependentsMessage

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 a new instance of DependentsMessage.



132
133
134
135
136
# File 'uninstall.rb', line 132

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

Instance Attribute Details

#depsObject (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.



130
131
132
# File 'uninstall.rb', line 130

def deps
  @deps
end

#named_argsObject (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.



130
131
132
# File 'uninstall.rb', line 130

def named_args
  @named_args
end

#reqsObject (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.



130
131
132
# File 'uninstall.rb', line 130

def reqs
  @reqs
end

Instance Method Details

#outputObject

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.



138
139
140
141
142
143
144
145
# File 'uninstall.rb', line 138

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