Exception: Homebrew::CLI::OptionConstraintError Private

Inherits:
UsageError show all
Defined in:
cli/error.rb

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.

Instance Attribute Summary

Attributes inherited from UsageError

#reason

Instance Method Summary collapse

Constructor Details

#initialize(arg1, arg2, missing: false) ⇒ void

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.

Parameters:

  • arg1 (String)
  • arg2 (String)
  • missing (Boolean) (defaults to: false)


10
11
12
13
14
15
16
17
# File 'cli/error.rb', line 10

def initialize(arg1, arg2, missing: false)
  message = if missing
    "`#{arg2}` cannot be passed without `#{arg1}`."
  else
    "`#{arg1}` and `#{arg2}` should be passed together."
  end
  super message
end