lib/ztk/logger.rb
# Parses caller entries, extracting the file, line number and method.
#
# @param [String] at Entry from the caller Array.
Parses caller entries, extracting the file, line number and method.
Parses caller entries extracting the file line number and method .
def parse_caller(at)
      if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
        file = Regexp.last_match[1]
        line = Regexp.last_match[2]
        method = Regexp.last_match[3]
        "#{File.basename(file)}:#{line}:#{method}|"
      else
        ""
      end
    end
def parse_caller ( at ) if / ^(.+?):( \d +)(?::in `(.*)')? / =~ at file = Regexp . last_match [ 1 ] line = Regexp . last_match [ 2 ] method = Regexp . last_match [ 3 ] "#{File.basename(file)}:#{line}:#{method}|" else "" end end
Parses caller entries, extracting the file, line number and method.
Parses caller entries extracting the file line number and method .
at
<not_specific>
<not_specific>
at Entry from the caller Array.
at Entry from the caller Array .