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.



127
128
129
130
131
# File 'uninstall.rb', line 127

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.



125
126
127
# File 'uninstall.rb', line 125

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.



125
126
127
# File 'uninstall.rb', line 125

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.



125
126
127
# File 'uninstall.rb', line 125

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.



133
134
135
136
137
138
139
140
# File 'uninstall.rb', line 133

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