Class: Homebrew::Uninstall::DependentsMessage Private

Inherits:
Object
  • Object
show all
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

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.



116
117
118
119
120
# File 'uninstall.rb', line 116

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.



114
115
116
# File 'uninstall.rb', line 114

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.



114
115
116
# File 'uninstall.rb', line 114

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.



114
115
116
# File 'uninstall.rb', line 114

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.



122
123
124
125
126
127
128
129
# File 'uninstall.rb', line 122

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