Exception: Toys::ArgParsingError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/toys/errors.rb

Overview

An exception indicating problems parsing arguments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ArgParsingError

Create an ArgParsingError given a set of error messages

Parameters:



24
25
26
27
# File 'lib/toys/errors.rb', line 24

def initialize(errors)
  @usage_errors = errors
  super(errors.join("\n"))
end

Instance Attribute Details

#usage_errorsArray<Toys::ArgParser::UsageError> (readonly)

The individual usage error messages.

Returns:



33
34
35
# File 'lib/toys/errors.rb', line 33

def usage_errors
  @usage_errors
end