Sha256: a3209fe453f3cc65186c803b2a4e5fd1341f5ea4262cfc44efd054252ea0920d
Contents?: true
Size: 579 Bytes
Versions: 3
Compression:
Stored size: 579 Bytes
Contents
#!/usr/bin/env ruby $: << File.expand_path('lib') class Add < Cl::Cmd register :add opt '--to GROUP' opt '--other GROUP', requires: :to def run p to: to, other: other end end Cl.new('owners').run(%w(add --to one --other two)) # Output: # # {:to=>"one", :other=>"two"} Cl.new('owners').run(%w(add --other two)) # Output: # # Missing option: to (required by other) # # Usage: owners add [options] # # Options: # # --to GROUP type: string # --other GROUP type: string, requires: to # --help Get help on this command
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
travis-cl-1.2.4 | examples/readme/requires |
cl-1.2.4 | examples/readme/requires |
cl-1.2.3 | examples/readme/requires |