Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (24 sloc) 532 Bytes
module RepoDepot
class Method < CodeHistory
def life_line
events.map(&:complexity)
end
def deltas
events.each_cons(2).map do |first, second|
second.complexity - first.complexity
end
end
def date_deltas
events.each_cons(2).map do |first, second|
(second.date - first.date) / 86400.0
end
end
def full_name
events.first.full_method_name
end
def complexity
return 0.0 if events.empty?
events.last.complexity
end
end
end
Something went wrong with that request. Please try again.