Exception: TapRemoteMismatchError Private

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

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Raised when a tap's remote does not match the actual remote.

Direct Known Subclasses

TapCoreRemoteMismatchError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, expected_remote, actual_remote) ⇒ TapRemoteMismatchError

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns a new instance of TapRemoteMismatchError.



310
311
312
313
314
315
316
# File 'exceptions.rb', line 310

def initialize(name, expected_remote, actual_remote)
  @name = name
  @expected_remote = expected_remote
  @actual_remote = actual_remote

  super message
end

Instance Attribute Details

#actual_remoteObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



308
309
310
# File 'exceptions.rb', line 308

def actual_remote
  @actual_remote
end

#expected_remoteObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



308
309
310
# File 'exceptions.rb', line 308

def expected_remote
  @expected_remote
end

#nameObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



308
309
310
# File 'exceptions.rb', line 308

def name
  @name
end

Instance Method Details

#messageObject

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



318
319
320
321
322
323
# File 'exceptions.rb', line 318

def message
  <<~EOS
    Tap #{name} remote mismatch.
    #{expected_remote} != #{actual_remote}
  EOS
end