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.
268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/cli/command_line_arguments.rb', line 268 def initialize(expected, actual) if expected.is_a?(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 |