4 # Gather complexity metrics about a piece of code via flog
6 class FlogBackend < Backend
13 flogger.flog_files @file
14 flogger.totals.each { |method, score| record method, score }
18 def record(method, score)
19 return if method =~ /\#none$/ # tossing this stuff
20 color = 'red' # TODO: determine color smartly
21 message = "#{method} flogs at #{score}"
22 (@layers[@file] ||= []) << Layer.new(method, color, message, self, @file)
26 Augment::BACKENDS['flog'] = self