Exception: TapFormulaOrCaskUnavailableError

Inherits:
FormulaOrCaskUnavailableError show all
Extended by:
T::Sig
Defined in:
exceptions.rb

Overview

Raised when a formula or cask in a specific tap is not available.

Instance Attribute Summary collapse

Attributes inherited from FormulaOrCaskUnavailableError

#name

Instance Method Summary collapse

Methods inherited from FormulaOrCaskUnavailableError

#did_you_mean

Constructor Details

#initialize(tap, name) ⇒ TapFormulaOrCaskUnavailableError

Returns a new instance of TapFormulaOrCaskUnavailableError.



114
115
116
117
# File 'exceptions.rb', line 114

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

Instance Attribute Details

#tapObject (readonly)

Returns the value of attribute tap.



112
113
114
# File 'exceptions.rb', line 112

def tap
  @tap
end

Instance Method Details

#to_sString

Returns:



120
121
122
123
124
# File 'exceptions.rb', line 120

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