Exception: Homebrew::CLI::NumberOfNamedArgumentsError
- Inherits:
-
UsageError
- Object
- RuntimeError
- UsageError
- Homebrew::CLI::NumberOfNamedArgumentsError
- Extended by:
- T::Sig
- Defined in:
- brew/Library/Homebrew/cli/parser.rb
Instance Attribute Summary
Attributes inherited from UsageError
Instance Method Summary collapse
-
#initialize(minimum, types: []) ⇒ void
constructor
Methods inherited from UsageError
Constructor Details
#initialize(minimum, types: []) ⇒ void
716 717 718 719 720 721 722 |
# File 'brew/Library/Homebrew/cli/parser.rb', line 716 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} #{"argument".pluralize(minimum)}." end |