Exception: Homebrew::CLI::MaxNamedArgumentsError

Inherits:
UsageError
  • Object
show all
Defined in:
Library/Homebrew/cli/parser.rb

Instance Attribute Summary

Attributes inherited from UsageError

#reason

Instance Method Summary collapse

Methods inherited from UsageError

#to_s

Constructor Details

#initialize(maximum) ⇒ MaxNamedArgumentsError

Returns a new instance of MaxNamedArgumentsError.


538
539
540
541
542
543
544
545
# File 'Library/Homebrew/cli/parser.rb', line 538

def initialize(maximum)
  super case maximum
  when 0
    "This command does not take named arguments."
  else
    "This command does not take more than #{maximum} named #{"argument".pluralize(maximum)}"
  end
end