Spec-Zone.ru › Homebrew

Exception: Cask::AbstractCaskErrorWithToken Private

Inherits:
CaskError
  • Object
  • RuntimeError
  • CaskError
  • Cask::AbstractCaskErrorWithToken
show all
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.

Direct Known Subclasses

CaskAlreadyCreatedError, CaskCannotBeInstalledError, CaskConflictError, CaskCyclicDependencyError, CaskInvalidError, CaskNotInstalledError, CaskUnavailableError

Instance Attribute Summary collapse

  • #reason ⇒ String readonly private
  • #token ⇒ String readonly private

Instance Method Summary collapse

  • #initialize(token, reason = nil) ⇒ void constructor private

Constructor Details

#initialize(token, reason = 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:

  • token (String, Symbol, Cask)
  • reason (Object, nil) (defaults to: nil)


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

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

  @token = T.let(token.to_s, String)
  @reason = T.let(reason.to_s, String)
end

Instance Attribute Details

#reason ⇒ 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)


32
33
34
# File 'cask/exceptions.rb', line 32

def reason
  @reason
end

#token ⇒ 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)


29
30
31
# File 'cask/exceptions.rb', line 29

def token
  @token
end

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

Spec-Zone.ru

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