Exception: FormulaUnavailableError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ FormulaUnavailableError

Returns a new instance of FormulaUnavailableError



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

def initialize(name)
  @name = name
end

Instance Attribute Details

#dependentObject

Returns the value of attribute dependent



69
70
71
# File 'brew/Library/Homebrew/exceptions.rb', line 69

def dependent
  @dependent
end

#nameObject (readonly)

Returns the value of attribute name



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

def name
  @name
end

Instance Method Details

#dependent_sObject



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

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

#to_sObject



79
80
81
# File 'brew/Library/Homebrew/exceptions.rb', line 79

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