Exception: Cask::AbstractCaskErrorWithToken Private

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

Abstract cask error containing a cask token.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, reason = nil) ⇒ AbstractCaskErrorWithToken

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 AbstractCaskErrorWithToken.



43
44
45
46
47
48
# File 'cask/exceptions.rb', line 43

def initialize(token, reason = nil)
  super()

  @token = token.to_s
  @reason = reason.to_s
end

Instance Attribute Details

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



41
42
43
# File 'cask/exceptions.rb', line 41

def reason
  @reason
end

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



38
39
40
# File 'cask/exceptions.rb', line 38

def token
  @token
end