diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 15:47:51 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 15:49:04 +0000 |
commit | fb1fd2bfe35f1f9784541fd4fcfb0e2d8efd5356 (patch) | |
tree | f563017d15683c8e4bdc9a24bf3704c2f64a75b0 /lib/slop.rb | |
parent | ff8ad326fed2099c412dc7a31cefdf52f2221b66 (diff) | |
download | slop-fb1fd2bfe35f1f9784541fd4fcfb0e2d8efd5356.tar.gz |
Add Slop.parse()
Diffstat (limited to 'lib/slop.rb')
-rw-r--r-- | lib/slop.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/slop.rb b/lib/slop.rb index b67881d..86a2984 100644 --- a/lib/slop.rb +++ b/lib/slop.rb @@ -5,6 +5,10 @@ require 'slop/result' require 'slop/types' module Slop + def self.parse(items = ARGV, **config, &block) + Options.new(config, &block).parse(items) + end + def self.option_defined?(name) const_defined?(string_to_option(name.to_s)) end |