diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2013-06-16 09:32:14 +0100 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2013-08-13 20:34:43 +0100 |
commit | 7d62cc1b72e19b965fd313f2712db2fa4853fb33 (patch) | |
tree | 8250ff876d7d8cf1ed0db8aced6cfa1e701f3fb5 /lib/slop.rb | |
parent | 958eda5946dd7a0c86e3e13fc75e2d74a660a88a (diff) | |
download | slop-7d62cc1b72e19b965fd313f2712db2fa4853fb33.tar.gz |
move error classes into slop/errors
Diffstat (limited to 'lib/slop.rb')
-rw-r--r-- | lib/slop.rb | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/slop.rb b/lib/slop.rb index 9f770ab..23163da 100644 --- a/lib/slop.rb +++ b/lib/slop.rb @@ -1,28 +1,11 @@ require 'slop/option' +require 'slop/errors' class Slop include Enumerable VERSION = '3.4.6' - # The main Error class, all Exception classes inherit from this class. - class Error < StandardError; end - - # Raised when an option argument is expected but none are given. - class MissingArgumentError < Error; end - - # Raised when an option is expected/required but not present. - class MissingOptionError < Error; end - - # Raised when an argument does not match its intended match constraint. - class InvalidArgumentError < Error; end - - # Raised when an invalid option is found and the strict flag is enabled. - class InvalidOptionError < Error; end - - # Raised when an invalid command is found and the strict flag is enabled. - class InvalidCommandError < Error; end - # Returns a default Hash of configuration options this Slop instance uses. DEFAULT_OPTIONS = { :strict => false, |