Sha256: 8fb60974c69a022f0dfc159d3d412695115f03c56b5ab56d9069a656c3b80c66
Contents?: true
Size: 562 Bytes
Versions: 15
Compression:
Stored size: 562 Bytes
Contents
#!/usr/bin/env ruby $: << File.expand_path('lib') class Add < Cl::Cmd 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
15 entries across 15 versions & 1 rubygems