Class: Cask::CaskLoader::FromTapPathLoader

Inherits:
FromPathLoader show all
Defined in:
brew/Library/Homebrew/cask/cask_loader.rb

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

Returns a new instance of FromTapPathLoader



113
114
115
116
# File 'brew/Library/Homebrew/cask/cask_loader.rb', line 113

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

Instance Attribute Details

#tapObject (readonly)

Returns the value of attribute tap



111
112
113
# File 'brew/Library/Homebrew/cask/cask_loader.rb', line 111

def tap
  @tap
end

Class Method Details

.can_load?(ref) ⇒ Boolean

Returns:

  • (Boolean)


107
108
109
# File 'brew/Library/Homebrew/cask/cask_loader.rb', line 107

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