Exception: Homebrew::CLI::NumberOfNamedArgumentsError Private
- Inherits:
-
UsageError
- Object
- RuntimeError
- UsageError
- Homebrew::CLI::NumberOfNamedArgumentsError
- Defined in:
- cli/parser.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
Instance Method Summary collapse
- #initialize(minimum, types: []) ⇒ void constructor private
Constructor Details
#initialize(minimum, types: []) ⇒ 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.
791 792 793 794 795 796 797 |
# File 'cli/parser.rb', line 791 def initialize(minimum, types: []) types << :named if types.empty? arg_types = types.map { |type| type.to_s.tr("_", " ") } .to_sentence two_words_connector: " or ", last_word_connector: " or " super "This command requires exactly #{minimum} #{arg_types} #{Utils.pluralize("argument", minimum)}." end |