Class: Clin::RequiredArgumentError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/clin/errors.rb

Overview

Error when a fixed argument is not matched

Instance Method Summary collapse

Constructor Details

#initialize(argument = '', got = '') ⇒ RequiredArgumentError

Create a new FixedArgumentError

Parameters:

  • argument (String) (defaults to: '')

    Name of the fixed argument

  • got (String) (defaults to: '')

    What argument was in place of the fixed argument



36
37
38
# File 'lib/clin/errors.rb', line 36

def initialize(argument = '', got = '')
  super("Expecting '#{argument}' but got '#{got}'")
end