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

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:



268
269
270
# File 'cask/cask_loader.rb', line 268

def initialize(cask)
  @cask = cask
end

Class Method Details

.try_new(ref, warn: false) ⇒ T.attached_class?

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:

  • (T.attached_class, nil)


263
264
265
# File 'cask/cask_loader.rb', line 263

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

Instance Method Details

#load(config:) ⇒ Object

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.



272
273
274
# File 'cask/cask_loader.rb', line 272

def load(config:)
  @cask
end