Sha256: 7a0375e2b76498e4f0a91c314e64d52418a81c452e190341c5883b3c1ed8ef67
Contents?: true
Size: 500 Bytes
Versions: 6
Compression:
Stored size: 500 Bytes
Contents
module Rnfse class CallChain def self.caller_method(depth=1) parse_caller(caller(depth+1).first).last end private # Stolen from ActionMailer with a tweek, # where this was used but was not made reusable def self.parse_caller(at) if /^(.+?):(\d+)(?::in `((block in )?(.*))')?/ =~ at file = Regexp.last_match[1] line = Regexp.last_match[2].to_i method = Regexp.last_match[5] [file, line, method] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems