Method: Lapine::AnnotatedLogger#parse_caller

Defined in:
lib/lapine/annotated_logger.rb

#parse_caller(at) ⇒ Object



64
65
66
67
68
69
70
71
# File 'lib/lapine/annotated_logger.rb', line 64

def parse_caller(at)
  if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
    file = Regexp.last_match[1]
    line = Regexp.last_match[2].to_i
    method = Regexp.last_match[3]
    [file, line, method]
  end
end