lib/attractor/cli.rb in attractor-0.1.1 vs lib/attractor/cli.rb in attractor-0.1.2
- old
+ new
@@ -6,15 +6,16 @@
module Attractor
# contains methods implementing the CLI
class CLI < Thor
desc 'calc', 'Calculates churn and complexity for all ruby files in current directory'
+ option :file_prefix, aliases: :p
def calc
puts 'Calculated churn and complexity'
puts
puts "file_path#{' ' * 53}complexity churn"
puts '-' * 80
- Attractor::Calculator.output_console
+ Attractor::Calculator.output_console(file_prefix: options[:file_prefix])
end
desc 'report', 'Generates an HTML report'
option :format, aliases: :f, default: 'html'
option :file_prefix, aliases: :p