Class: Cask::CaskLoader::NullLoader

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

Instance Attribute Summary

Attributes inherited from FromPathLoader

#path, #token

Attributes inherited from FromContentLoader

#content

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ref) ⇒ NullLoader

Returns a new instance of NullLoader



163
164
165
166
# File 'brew/Library/Homebrew/cask/cask_loader.rb', line 163

def initialize(ref)
  token = File.basename(ref, ".rb")
  super CaskLoader.default_path(token)
end

Class Method Details

.can_load?Boolean

Returns:

  • (Boolean)


159
160
161
# File 'brew/Library/Homebrew/cask/cask_loader.rb', line 159

def self.can_load?(*)
  true
end

Instance Method Details

#loadObject



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

def load
  raise CaskUnavailableError.new(token, "No Cask with this name exists.")
end