Spec-Zone.ru › Homebrew

Class: Cask::CaskLoader::FromInstanceLoader Private

Inherits:
Object
  • Object
  • Cask::CaskLoader::FromInstanceLoader
show all
Includes:
ILoader
Defined in:
cask/cask_loader.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.

Loads a cask from an existing Cask::Cask instance.

Class Method Summary collapse

  • .try_new(ref, warn: false) ⇒ FromInstanceLoader? private

Instance Method Summary collapse

  • #initialize(cask) ⇒ void constructor private
  • #load(config:) ⇒ Cask private

    This is a false positive incompatibililty warning, due to Kernel#load being overridden.

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_upgradable, #pretty_warning

Constructor Details

#initialize(cask) ⇒ 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:

  • cask (Cask)


361
362
363
# File 'cask/cask_loader.rb', line 361

def initialize(cask)
  @cask = cask
end

Class Method Details

.try_new(ref, warn: false) ⇒ FromInstanceLoader?

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:

  • ref (String, Pathname, Cask, URI::Generic)
  • warn (Boolean) (defaults to: false)

Returns:

  • (FromInstanceLoader, nil)


356
357
358
# File 'cask/cask_loader.rb', line 356

def self.try_new(ref, warn: false)
  new(ref) if ref.is_a?(Cask)
end

Instance Method Details

#load(config:) ⇒ Cask

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.

This is a false positive incompatibililty warning, due to Kernel#load being overridden.

Parameters:

  • config (Config, nil)

Returns:

  • (Cask)


367
368
369
# File 'cask/cask_loader.rb', line 367

def load(config:)
  @cask
end

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

Spec-Zone.ru

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