Class: Packcr::Cli
- Inherits:
-
Object
- Object
- Packcr::Cli
- Defined in:
- lib/packcr/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(argv) ⇒ Object
6 7 8 |
# File 'lib/packcr/cli.rb', line 6 def run(argv) new.run(argv) end |
Instance Method Details
#run(argv) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/packcr/cli.rb', line 11 def run(argv) lang = nil debug = false ascii = false opt = OptionParser.new opt.on("-l", "--lang=VAL") {|v| lang = v.to_sym } opt.on("-d", "--debug") {|v| debug = true } opt.on("-a", "--ascii") {|v| ascii = true } opt.parse!(argv) argv.each do |ifile| Packcr.new(ifile, lang: lang, debug: debug, ascii: ascii).run end end |