Skip to content

Commit

Permalink
annotaged flog data
Browse files Browse the repository at this point in the history
  • Loading branch information
dj2 authored and Jake Scruggs committed Mar 1, 2011
1 parent 038ee82 commit 71536ed
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/generators/flog.rb
Expand Up @@ -48,6 +48,19 @@ def to_h
:method_containers => sorted_containers.map {|method_container| method_container.to_h}}}
end

def per_file_info(out)
@method_containers.each_pair do |klass, container|
container.methods.each_pair do |method_name, data|
next if data[:path].nil?

file, line = data[:path].split(':')

out[file] ||= {}
out[file][line] ||= []
out[file][line] << {:type => :flog, :description => "Score of %.2f" % data[:score]}
end
end
end
end

class MethodContainer
Expand Down

0 comments on commit 71536ed

Please sign in to comment.