Exception: CommandLine::ParametersOutOfRange
- Defined in:
- lib/cli/command_line_arguments.rb
Overview
Missing a required file
Instance Method Summary collapse
-
#initialize(expected, actual) ⇒ ParametersOutOfRange
constructor
A new instance of ParametersOutOfRange.
Constructor Details
#initialize(expected, actual) ⇒ ParametersOutOfRange
Returns a new instance of ParametersOutOfRange.
275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/cli/command_line_arguments.rb', line 275 def initialize(expected, actual) if expected.kind_of?(Range) if expected.end == CommandLine::Arguments::Definition::ENDLESS_PARAMETERS super("The command expected at least #{expected.begin} parameters, but found #{actual}!") else super("The command expected between #{expected.begin} and #{expected.end} parameters, but found #{actual}!") end else super("The command expected #{expected} parameters, but found #{actual}!") end end |