Spec-Zone.ru › Homebrew

Exception: Utils::Inreplace::Error Private

Inherits:
RuntimeError
  • Object
  • RuntimeError
  • Utils::Inreplace::Error
show all
Defined in:
utils/inreplace.rb

Overview

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.

Error during text replacement.

Instance Method Summary collapse

  • #initialize(errors) ⇒ void constructor private

Constructor Details

#initialize(errors) ⇒ void

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.

Parameters:

  • errors (Hash{String, Pathname => Array<String>})


12
13
14
15
16
17
# File 'utils/inreplace.rb', line 12

def initialize(errors)
  formatted_errors = errors.reduce(+"inreplace failed\n") do |s, (path, errs)|
    s << "#{path}:\n" << errs.map { |e| "#{e}\n" }.join
  end
  super formatted_errors.freeze
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/Utils/Inreplace/Error.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API