MetricFu::Generator
# File lib/generators/flog.rb, line 148 def initialize(score, average_score, scanned_methods = []) @score = score.to_f @scanned_methods = scanned_methods @average_score = average_score.to_f end
# File lib/generators/flog.rb, line 154 def filename File.basename(path, ".txt") end
# File lib/generators/flog.rb, line 166 def highest_score scanned_methods.inject(0) do |highest, m| m.score > highest ? m.score : highest end end
# File lib/generators/flog.rb, line 158 def to_h {:score => @score, :scanned_methods => @scanned_methods.map {|sm| sm.to_h}, :highest_score => highest_score, :average_score => average_score, :path => path} end
[Validate]
Generated with the Darkfish Rdoc Generator 2.