Exception: TapFormulaWithOldnameAmbiguityError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- TapFormulaWithOldnameAmbiguityError
- Defined in:
- exceptions.rb
Overview
Raised when a formula’s old name in a specific tap is found in multiple taps.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#possible_tap_newname_formulae ⇒ Object
readonly
Returns the value of attribute possible_tap_newname_formulae.
-
#taps ⇒ Object
readonly
Returns the value of attribute taps.
Instance Method Summary collapse
-
#initialize(name, possible_tap_newname_formulae) ⇒ TapFormulaWithOldnameAmbiguityError
constructor
A new instance of TapFormulaWithOldnameAmbiguityError.
Constructor Details
#initialize(name, possible_tap_newname_formulae) ⇒ TapFormulaWithOldnameAmbiguityError
Returns a new instance of TapFormulaWithOldnameAmbiguityError.
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'exceptions.rb', line 285 def initialize(name, possible_tap_newname_formulae) @name = name @possible_tap_newname_formulae = possible_tap_newname_formulae @taps = possible_tap_newname_formulae.map do |newname| newname =~ HOMEBREW_TAP_FORMULA_REGEX "#{Regexp.last_match(1)}/#{Regexp.last_match(2)}" end super <<~EOS Formulae with '#{name}' old name found in multiple taps: #{taps.map { |t| "\n * #{t}" }.join} Please use the fully-qualified name (e.g. #{taps.first}/#{name}) to refer to the formula or use its new name. EOS end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
283 284 285 |
# File 'exceptions.rb', line 283 def name @name end |
#possible_tap_newname_formulae ⇒ Object (readonly)
Returns the value of attribute possible_tap_newname_formulae.
283 284 285 |
# File 'exceptions.rb', line 283 def possible_tap_newname_formulae @possible_tap_newname_formulae end |
#taps ⇒ Object (readonly)
Returns the value of attribute taps.
283 284 285 |
# File 'exceptions.rb', line 283 def taps @taps end |