class Rbkb::Cli::Chars
Copyright 2009 emonti at matasano.com See README.rdoc for license information
Repeats an argument N times
Public Instance Methods
go(*args)
click to toggle source
Calls superclass method
Rbkb::Cli::Executable#go
# File lib/rbkb/cli/chars.rb, line 18 def go(*args) super(*args) @stdout << @argv[1] * @argv[0].to_i self.exit(0) end
make_parser()
click to toggle source
Calls superclass method
Rbkb::Cli::Executable#make_parser
# File lib/rbkb/cli/chars.rb, line 8 def make_parser super() @oparse.banner += " 100 A; # print 100 A's" end
parse(*args)
click to toggle source
Calls superclass method
Rbkb::Cli::Executable#parse
# File lib/rbkb/cli/chars.rb, line 13 def parse(*args) super(*args) bail_args @argv.join(' ') unless @argv.size == 2 end