lib/hisyo/cli.rb in hisyo-0.1.0 vs lib/hisyo/cli.rb in hisyo-0.2.0

- old
+ new

@@ -1,20 +1,8 @@ -require "optparse" - module Hisyo module CLI def self.run(argv) - Hisyo.generate_project parse_options(argv) - end - - def self.parse_options(argv) - options = {} - OptionParser.new do |opts| - opts.on('-n', '--dry-run', 'Do not actually run'){|v| options[:dryrun] = true} - opts.on('-v', '--verbose', 'Verbose mode'){|v| options[:verbose] = true} - opts.on('-r VAL', '--root=VAL', 'Application root directory'){|v| options[:root] = v} - opts.parse!(argv) - end - options + gen = Generator.new(argv) + gen.run end end end