Sha256: 024ec4f056e102abf70c3293386c44e35bfa898c6a05e565f132471ff859bab3
Contents?: true
Size: 729 Bytes
Versions: 4
Compression:
Stored size: 729 Bytes
Contents
#!/bin/env ruby require "Getopt/Declare" def delold print "would have deleted\n" end args = Getopt::Declare.new(<<EOF) -a Process all data -b <n:n> Set mean byte length threshold to <N> { bytelen = n } +c <FILE> Create new file <FILE> --del Delete old file { delold(); } delete [ditto] e <w:i>x<h:i> Expand image to height <h> and width <w> { } -F <file>... Process named file(s) { defer { file.each {|i| process(i) } } } =getrand [<n>] Get a random number (or, optionally, <n> of them) { n = 1 unless !n.empty? } -- Traditionally indicates end of arguments { finish } EOF print args.inspect
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
getopt-declare-1.20 | samples/cmdline_mid.rb |
getopt-declare-1.13 | samples/cmdline_mid.rb |
getopt-declare-1.21 | samples/cmdline_mid.rb |
getopt-declare-1.12 | samples/cmdline_mid.rb |