Exception: NoSuchKegError Private

Inherits:
RuntimeError
  • Object
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

Instance Method Summary collapse

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

#nameString (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:



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

def name
  @name
end

#tapTap? (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:



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

def tap
  @tap
end