Sha256: 7b222758132820534dacb201e2e6111924e6b4a9c8c4df6f4ca894d786a25e36

Contents?: true

Size: 609 Bytes

Versions: 4

Compression:

Stored size: 609 Bytes

Contents

require File.expand_path("../../lib/docopt.rb", __FILE__)

doc = <<DOCOPT
Example of program which uses [options] shortcut in pattern.

Usage:
  #{__FILE__} [options] <port>

Options:
  -h --help                show this help message and exit
  --version                show version and exit
  -n, --number N           use N as a number
  -t, --timeout TIMEOUT    set timeout TIMEOUT seconds
  --apply                  apply changes to database
  -q                       operate in quiet mode

DOCOPT


begin
  puts Docopt::docopt(doc, version: '1.0.0rc2').to_s
rescue Docopt::Exit => e
  puts e.message
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
docopt-0.6.1 examples/any_options_example.rb
docopt-0.6.0 examples/any_options_example.rb
wooga_docopt-0.6.0.1 examples/any_options_example.rb
docopt-0.5.0 examples/any_options_example.rb