Method: Pry::Slop.parse

Defined in:
lib/pry/slop.rb

.parse(items = ARGV, config = {}, &block) ⇒ Object

items - The Array of items to extract options from (default: ARGV). config - The Hash of configuration options to send to Slop.new(). block - An optional block used to add options.

Examples:

Slop.parse(ARGV, :help => true) do
  on '-n', '--name', 'Your username', :argument => true
end

Returns a new instance of Slop.



54
55
56
# File 'lib/pry/slop.rb', line 54

def parse(items = ARGV, config = {}, &block)
  parse! items.dup, config, &block
end