Exception: Cindy::CLI::InvalidArgumentError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Cindy::CLI::InvalidArgumentError
- Defined in:
- lib/cindy/cli.rb
Instance Method Summary collapse
-
#initialize(given, expected) ⇒ InvalidArgumentError
constructor
A new instance of InvalidArgumentError.
Constructor Details
#initialize(given, expected) ⇒ InvalidArgumentError
Returns a new instance of InvalidArgumentError.
8 9 10 11 12 13 14 15 |
# File 'lib/cindy/cli.rb', line 8 def initialize(given, expected) super "invalid argument '#{given}'" + case expected when String ", expecting '#{expected}'" when Array ", expecting one of: '#{expected.join('\', \'')}'" end end |