Exception: TapFormulaUnavailableError

Inherits:
FormulaUnavailableError show all
Defined in:
exceptions.rb

Overview

Raised when a formula in a specific tap is unavailable.

Instance Attribute Summary collapse

Attributes inherited from FormulaUnavailableError

#dependent

Attributes inherited from FormulaOrCaskUnavailableError

#name

Instance Method Summary collapse

Methods inherited from FormulaUnavailableError

#dependent_s

Methods inherited from FormulaOrCaskUnavailableError

#did_you_mean

Constructor Details

#initialize(tap, name) ⇒ TapFormulaUnavailableError

Returns a new instance of TapFormulaUnavailableError.



223
224
225
226
227
228
# File 'exceptions.rb', line 223

def initialize(tap, name)
  @tap = tap
  @user = tap.user
  @repo = tap.repo
  super "#{tap}/#{name}"
end

Instance Attribute Details

#repoObject (readonly)

Returns the value of attribute repo.



221
222
223
# File 'exceptions.rb', line 221

def repo
  @repo
end

#tapObject (readonly)

Returns the value of attribute tap.



221
222
223
# File 'exceptions.rb', line 221

def tap
  @tap
end

#userObject (readonly)

Returns the value of attribute user.



221
222
223
# File 'exceptions.rb', line 221

def user
  @user
end

Instance Method Details

#to_sObject



230
231
232
233
234
# File 'exceptions.rb', line 230

def to_s
  s = super
  s += "\nPlease tap it and then try again: brew tap #{tap}" unless tap.installed?
  s
end