Class: Cask::CaskLoader::FromTapPathLoader Private

Inherits:
FromPathLoader 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 a tap path.

Direct Known Subclasses

FromDefaultTapPathLoader, FromTapLoader

Instance Attribute Summary

Attributes inherited from FromPathLoader

#path, #token

Attributes inherited from AbstractContentLoader

#content, #tap

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FromPathLoader

#load

Methods included from ILoader

#load

Constructor Details

#initialize(path) ⇒ FromTapPathLoader

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 FromTapPathLoader.



179
180
181
182
# File 'cask/cask_loader.rb', line 179

def initialize(path)
  super(path)
  @tap = Tap.from_path(path)
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)


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

def self.can_load?(ref)
  super && !Tap.from_path(ref).nil?
end