class Rcov::CallSiteAnalyzer
def callsites(classname_or_fullname, methodname = nil)
analyzer.callsites("Foo", "f1")
or
analyzer.callsites("Foo.g1") # singleton method of the class
analyzer.callsites("Foo#f1") # instance method
Can be called in two ways:
Returns a hash with CallSite => call count associations or +nil+
def callsites(classname_or_fullname, methodname = nil) rawsites = raw_data_relative.first[expand_name(classname_or_fullname, methodname)] return nil unless rawsites ret = {} # could be a job for inject but it's slow and I don't mind the extra loc rawsites.each_pair do |backtrace, count| ret[CallSite.new(backtrace)] = count end ret end