Class: Cask::CaskLoader::FromInstanceLoader Private

Inherits:
Object
  • Object
show all
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) ⇒ 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.

Returns a new instance of FromInstanceLoader.



172
173
174
# File 'cask/cask_loader.rb', line 172

def initialize(cask)
  @cask = cask
end

Class Method Details

.can_load?(ref) ⇒ Boolean

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:

  • (Boolean)


168
169
170
# File 'cask/cask_loader.rb', line 168

def self.can_load?(ref)
  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.



176
177
178
# File 'cask/cask_loader.rb', line 176

def load(config:)
  @cask
end