class Sinatra::Base

def caller_locations

first element being the file, and the second being the line.
Like caller_files, but containing Arrays rather than strings with the
def caller_locations
  caller(1).
    map    { |line| line.split(/:(?=\d|in )/)[0,2] }.
    reject { |file,line| CALLERS_TO_IGNORE.any? { |pattern| file =~ pattern } }
end