Class: Cask::CaskLoader::FromInstanceLoader Private

Inherits:
Object
  • Object
show all
Defined in:
Library/Homebrew/cask/cask_loader.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

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. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FromInstanceLoader.


169
170
171
# File 'Library/Homebrew/cask/cask_loader.rb', line 169

def initialize(cask)
  @cask = cask
end

Class Method Details

.can_load?(ref) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

165
166
167
# File 'Library/Homebrew/cask/cask_loader.rb', line 165

def self.can_load?(ref)
  ref.is_a?(Cask)
end

Instance Method Details

#load(config:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


173
174
175
# File 'Library/Homebrew/cask/cask_loader.rb', line 173

def load(config:)
  @cask
end