Exception: FormulaUnavailableError

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

Overview

Raised when a formula is not available.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ FormulaUnavailableError

Returns a new instance of FormulaUnavailableError.


76
77
78
79
80
# File 'Library/Homebrew/exceptions.rb', line 76

def initialize(name)
  super

  @name = name
end

Instance Attribute Details

#dependentObject

Returns the value of attribute dependent


74
75
76
# File 'Library/Homebrew/exceptions.rb', line 74

def dependent
  @dependent
end

#nameObject (readonly)

Returns the value of attribute name


73
74
75
# File 'Library/Homebrew/exceptions.rb', line 73

def name
  @name
end

Instance Method Details

#dependent_sObject


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

def dependent_s
  "(dependency of #{dependent})" if dependent && dependent != name
end

#to_sObject


86
87
88
# File 'Library/Homebrew/exceptions.rb', line 86

def to_s
  "No available formula with the name \"#{name}\" #{dependent_s}"
end