Class: Cask::CaskLoader::FromTapPathLoader Private

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

Direct Known Subclasses

FromTapLoader

Instance Attribute Summary collapse

Attributes inherited from FromPathLoader

#path, #token

Attributes inherited from FromContentLoader

#content

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FromPathLoader

#load

Methods inherited from FromContentLoader

#load

Constructor Details

#initialize(path) ⇒ FromTapPathLoader

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


133
134
135
136
# File 'Library/Homebrew/cask/cask_loader.rb', line 133

def initialize(path)
  @tap = Tap.from_path(path)
  super(path)
end

Instance Attribute Details

#tapObject (readonly)

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.


131
132
133
# File 'Library/Homebrew/cask/cask_loader.rb', line 131

def tap
  @tap
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)

127
128
129
# File 'Library/Homebrew/cask/cask_loader.rb', line 127

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