Sha256: 8a8ef58150c526e73612c72e9a42801005826f63cd529479881c8feb0bbfccd8
Contents?: true
Size: 464 Bytes
Versions: 11
Compression:
Stored size: 464 Bytes
Contents
require 'rbkb/cli' # Copyright 2009 emonti at matasano.com # See README.rdoc for license information # # Repeats an argument N times class Rbkb::Cli::Chars < Rbkb::Cli::Executable def make_parser super() @oparse.banner += " 100 A; # print 100 A's" end def parse(*args) super(*args) bail_args @argv.join(' ') unless @argv.size == 2 end def go(*args) super(*args) @stdout << @argv[1] * @argv[0].to_i self.exit(0) end end
Version data entries
11 entries across 11 versions & 2 rubygems