Class: RailsBestPractices::CLI
- Inherits:
-
Object
- Object
- RailsBestPractices::CLI
- Defined in:
- lib/rails_best_practices/cli.rb
Class Method Summary collapse
-
.run(argv) ⇒ Boolean
Run analyze with ruby code.
Class Method Details
.run(argv) ⇒ Boolean
Run analyze with ruby code
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rails_best_practices/cli.rb', line 10 def self.run(argv) = OptionParser.parse!(argv) if !argv.empty? && !File.exist?(argv.first) raise Errno::ENOENT, "#{argv.first} doesn't exist" end analyzer = Analyzer.new(argv.first, ) analyzer.analyze analyzer.output analyzer.runner.errors.empty? end |