Class: MetricFu::Flay

Inherits:
Base::Generator show all
Defined in:
lib/metric_fu/flay.rb

Instance Method Summary collapse

Methods inherited from Base::Generator

#generate_html, generate_report, #generate_report, #initialize, metric_dir, #save_html, #template_file, #template_name, template_name

Methods included from TemplateHelpers

#cycle, #inline_css, #link_to_filename

Constructor Details

This class inherits a constructor from MetricFu::Base::Generator

Instance Method Details

#analyzeObject


10
11
12
13
14
# File 'lib/metric_fu/flay.rb', line 10

def analyze
  files_to_flay = MetricFu.flay[:dirs_to_flay].map{|dir| Dir[File.join(dir, "**/*.rb")] }
  output = `flay #{files_to_flay.join(" ")}`
  @matches = output.chomp.split("\n\n").map{|m| m.split("\n  ") }
end