Refactor CLI usage into CLI.run!:

* Add Producer::Core::CLI::ArgumentError class;
* Raise ArgumentError in CLI.new when recipe is missing;
* Remove #check_arguments! and #print_usage_and_exit, move code into
  .run! method.
This commit is contained in:
Thibault Jouan
2014-01-07 21:02:00 +00:00
parent dc9e7f1412
commit f7efd9c42f
3 changed files with 54 additions and 42 deletions

View File

@@ -2,4 +2,4 @@
require 'producer/core'
Producer::Core::CLI.new(ARGV).run!
Producer::Core::CLI.run!(ARGV)