Class: Cask::CaskLoader::FromInstanceLoader Private

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

Instance Method Summary collapse

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, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #pretty_upgradable

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:



353
354
355
# File 'cask/cask_loader.rb', line 353

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:

Returns:



348
349
350
# File 'cask/cask_loader.rb', line 348

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:

Returns:



359
360
361
# File 'cask/cask_loader.rb', line 359

def load(config:)
  @cask
end