summaryrefslogtreecommitdiff
path: root/lib/slop/options.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/slop/options.rb')
-rwxr-xr-xlib/slop/options.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/slop/options.rb b/lib/slop/options.rb
index 17e9501..5e71eac 100755
--- a/lib/slop/options.rb
+++ b/lib/slop/options.rb
@@ -7,6 +7,7 @@ module Slop
type: "null",
banner: true,
underscore_flags: true,
+ validate_types: false,
}
# The Array of Option instances we've created.
@@ -24,6 +25,9 @@ module Slop
# The String banner prefixed to the help string.
attr_accessor :banner
+ # Whether we should validate types of values provided by the user
+ attr_accessor :validate_types
+
def initialize(**config, &block)
@options = []
@separators = []