Exception: FormulaOrCaskUnavailableError

Inherits:
RuntimeError
  • Object
show all
Defined in:
brew/Library/Homebrew/exceptions.rb

Overview

Raised when neither a formula nor a cask with the given name is available.

Direct Known Subclasses

FormulaUnavailableError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ FormulaOrCaskUnavailableError

Returns a new instance of FormulaOrCaskUnavailableError.



83
84
85
86
87
# File 'brew/Library/Homebrew/exceptions.rb', line 83

def initialize(name)
  super()

  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



81
82
83
# File 'brew/Library/Homebrew/exceptions.rb', line 81

def name
  @name
end

Instance Method Details

#to_sObject



89
90
91
# File 'brew/Library/Homebrew/exceptions.rb', line 89

def to_s
  "No available formula or cask with the name \"#{name}\"."
end