Exception: Cask::TapCaskUnavailableError Private

Inherits:
CaskUnavailableError show all
Extended by:
T::Sig
Defined in:
cask/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.

Error when a cask in a specific tap is not available.

Instance Attribute Summary collapse

Attributes inherited from AbstractCaskErrorWithToken

#reason, #token

Instance Method Summary collapse

Constructor Details

#initialize(tap, token) ⇒ TapCaskUnavailableError

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 a new instance of TapCaskUnavailableError.



114
115
116
117
# File 'cask/exceptions.rb', line 114

def initialize(tap, token)
  super("#{tap}/#{token}")
  @tap = tap
end

Instance Attribute Details

#tapObject (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.



112
113
114
# File 'cask/exceptions.rb', line 112

def tap
  @tap
end

Instance Method Details

#to_sString

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:



120
121
122
123
124
# File 'cask/exceptions.rb', line 120

def to_s
  s = super
  s += "\nPlease tap it and then try again: brew tap #{tap}" unless tap.installed?
  s
end