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



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

def initialize(name)
  @name = name
end

Instance Attribute Details

#dependentObject

Returns the value of attribute dependent



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

def dependent
  @dependent
end

#nameObject (readonly)

Returns the value of attribute name



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

def name
  @name
end

Instance Method Details

#dependent_sObject



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

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

#to_sObject



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

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