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:



240
241
242
# File 'cask/cask_loader.rb', line 240

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)


235
236
237
# File 'cask/cask_loader.rb', line 235

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.



244
245
246
# File 'cask/cask_loader.rb', line 244

def load(config:)
  @cask
end