Sha256: ba6b99e6e340d0f2154226b991300d955f4f61fa317bd00cea8c8426c5a47e95
Contents?: true
Size: 705 Bytes
Versions: 10
Compression:
Stored size: 705 Bytes
Contents
#!/usr/bin/env ruby require "Getopt/Declare" # With the next specification, the <tt>-rev</tt> and/or <tt>-rand</tt> flags # can be specified _after_ the list of files, but still affect the processing # of those files. Moreover, if the command-line parsing fails for some reason # (perhaps due to an unrecognized argument), the deferred processing will # not be performed. args = Getopt::Declare.new( %q{ <files>... Files to be processed { defer { files.each { |i| puts i, " ",$ordered } } } -rev[erse] Process in reverse order { $ordered = -1; } -rand[om] Process in random order { $ordered = 0; } } )
Version data entries
10 entries across 10 versions & 1 rubygems