Make parameter names match superclass parameter names

This commit is contained in:
Jack Nagel 2014-09-12 21:27:00 -05:00
parent c85c165fe9
commit 1f3bbe64e0

View File

@ -113,12 +113,12 @@ class UnsatisfiedRequirements < Homebrew::InstallationError
end end
class FormulaConflictError < Homebrew::InstallationError class FormulaConflictError < Homebrew::InstallationError
attr_reader :f, :conflicts attr_reader :conflicts
def initialize(f, conflicts) def initialize(formula, conflicts)
@f = f
@conflicts = conflicts @conflicts = conflicts
super f, message @formula = formula
super formula, message
end end
def conflict_message(conflict) def conflict_message(conflict)
@ -130,7 +130,7 @@ class FormulaConflictError < Homebrew::InstallationError
def message def message
message = [] message = []
message << "Cannot install #{f.name} because conflicting formulae are installed.\n" message << "Cannot install #{formula.name} because conflicting formulae are installed.\n"
message.concat conflicts.map { |c| conflict_message(c) } << "" message.concat conflicts.map { |c| conflict_message(c) } << ""
message << <<-EOS.undent message << <<-EOS.undent
Please `brew unlink #{conflicts.map(&:name)*' '}` before continuing. Please `brew unlink #{conflicts.map(&:name)*' '}` before continuing.
@ -204,9 +204,9 @@ end
# raised by CompilerSelector if the formula fails with all of # raised by CompilerSelector if the formula fails with all of
# the compilers available on the user's system # the compilers available on the user's system
class CompilerSelectionError < Homebrew::InstallationError class CompilerSelectionError < Homebrew::InstallationError
def initialize f def initialize formula
super f, <<-EOS.undent super formula, <<-EOS.undent
#{f.name} cannot be built with any available compilers. #{formula.name} cannot be built with any available compilers.
To install this formula, you may need to: To install this formula, you may need to:
brew install gcc brew install gcc
EOS EOS