lib/attractor/cli.rb in attractor-2.3.0 vs lib/attractor/cli.rb in attractor-2.4.0

- old
+ new

@@ -43,13 +43,15 @@ desc "calc", "Calculates churn and complexity for all ruby files in current directory" shared_options.each do |shared_option| option(*shared_option) end + option(:format, aliases: :f, default: :table) def calc file_prefix = options[:file_prefix] + output_format = options[:format] - report! Attractor::ConsoleReporter.new(file_prefix: file_prefix, ignores: options[:ignore], calculators: calculators(options)) + report! Attractor::ConsoleReporter.new(file_prefix: file_prefix, ignores: options[:ignore], calculators: calculators(options), format: output_format) rescue RuntimeError => e puts "Runtime error: #{e.message}" end desc "report", "Generates an HTML report"