Class: Yome::Cli
- Inherits:
-
Object
- Object
- Yome::Cli
- Defined in:
- lib/yome/cli.rb
Class Method Summary collapse
Class Method Details
.exec(argv = []) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/yome/cli.rb', line 10 def self.exec(argv = []) opt = {lang: ""} parser = OptionParser.new("Usage: yome [DIR] [options]") parser.on('-o FILE', 'Output file name') {|v| opt[:output] = v } parser.on('--lang LANG', 'Specify code blocks language') {|v| opt[:lang] = v } parser.parse!(argv) dir = argv[0] || "." main(dir, opt) end |