Exception: FormulaUnavailableError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ FormulaUnavailableError

Returns a new instance of FormulaUnavailableError



67
68
69
# File 'Library/Homebrew/exceptions.rb', line 67

def initialize(name)
  @name = name
end

Instance Attribute Details

#dependentObject

Returns the value of attribute dependent



65
66
67
# File 'Library/Homebrew/exceptions.rb', line 65

def dependent
  @dependent
end

#nameObject (readonly)

Returns the value of attribute name



64
65
66
# File 'Library/Homebrew/exceptions.rb', line 64

def name
  @name
end

Instance Method Details

#dependent_sObject



71
72
73
# File 'Library/Homebrew/exceptions.rb', line 71

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

#to_sObject



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

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