Spec-Zone.ru › Homebrew

Exception: Cask::TapCaskAmbiguityError Private

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

Error when a cask with the same name is found in multiple taps.

Instance Attribute Summary collapse

  • #loaders ⇒ Array<CaskLoader::FromNameLoader> readonly private
  • #token ⇒ String readonly private

Instance Method Summary collapse

  • #initialize(token, loaders) ⇒ void constructor private

Constructor Details

#initialize(token, loaders) ⇒ 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)
  • loaders (Array<CaskLoader::FromNameLoader>)


132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'cask/exceptions.rb', line 132

def initialize(token, loaders)
  @token = token
  @loaders = loaders

  taps = loaders.map(&:tap)
  casks = taps.map { |tap| "#{tap}/#{token}" }
  cask_list = casks.sort.map { |f| "\n       * #{f}" }.join

  super <<~EOS
    Cask #{token} exists in multiple taps:#{cask_list}    Please use the fully-qualified name (e.g. #{casks.first}) to refer to a specific Cask.
  EOS
end

Instance Attribute Details

#loaders ⇒ Array<CaskLoader::FromNameLoader> (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:

  • (Array<CaskLoader::FromNameLoader>)


129
130
131
# File 'cask/exceptions.rb', line 129

def loaders
  @loaders
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)


126
127
128
# File 'cask/exceptions.rb', line 126

def token
  @token
end

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

Spec-Zone.ru

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