Exception: Rake::ToolkitProgram::WrongArgumentCount
- Inherits:
-
InvalidCommandLine
- Object
- StandardError
- InvalidCommandLine
- Rake::ToolkitProgram::WrongArgumentCount
- Includes:
- ProgramExitFromError
- Defined in:
- lib/rake/toolkit_program/errors.rb
Instance Method Summary collapse
-
#initialize(cardinality_test, actual_count) ⇒ WrongArgumentCount
constructor
A new instance of WrongArgumentCount.
Methods included from ProgramExitFromError
#exit_code, #exit_program!, included, #print_error_message
Methods inherited from InvalidCommandLine
Constructor Details
#initialize(cardinality_test, actual_count) ⇒ WrongArgumentCount
Returns a new instance of WrongArgumentCount.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/rake/toolkit_program/errors.rb', line 65 def initialize(cardinality_test, actual_count) super(case cardinality_test when Integer "expected #{cardinality_test} arguments, got #{actual_count}" when Range "expected #{cardinality_test.to_inclusive} (inclusive) arguments, got #{actual_count}" else "#{actual_count} arguments given" end) end |