Spec-Zone.ru › Homebrew

Exception: NoSuchKegError Private

Inherits:
RuntimeError
  • Object
  • RuntimeError
  • NoSuchKegError
show all
Defined in:
exceptions.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.

Raised when a keg doesn't exist.

Instance Attribute Summary collapse

  • #name ⇒ String readonly private
  • #tap ⇒ Tap? readonly private

Instance Method Summary collapse

  • #initialize(name, tap: nil) ⇒ void constructor private

Constructor Details

#initialize(name, tap: nil) ⇒ 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:

  • name (String)
  • tap (Tap, nil) (defaults to: nil)


73
74
75
76
77
78
79
# File 'exceptions.rb', line 73

def initialize(name, tap: nil)
  @name = name
  @tap = tap
  message = "No such keg: #{HOMEBREW_CELLAR}/#{name}"
  message += " from tap #{tap}" if tap
  super message
end

Instance Attribute Details

#name ⇒ String (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.

Returns:

  • (String)


67
68
69
# File 'exceptions.rb', line 67

def name
  @name
end

#tap ⇒ Tap? (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.

Returns:

  • (Tap, nil)


70
71
72
# File 'exceptions.rb', line 70

def tap
  @tap
end

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

Spec-Zone.ru

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