module Haml::Util
def caller_info(entry = caller[1])
-
([String, Fixnum, (String, nil)])
- An array containing the filename, line, and method name of the caller.
Parameters:
-
entry
(String
) -- An entry in the `#caller` list, or a similarly formatted string
def caller_info(entry = caller[1]) info = entry.scan(/^(.*?):(-?.*?)(?::.*`(.+)')?$/).first info[1] = info[1].to_i # This is added by Rubinius to designate a block, but we don't care about it. info[2].sub!(/ \{\}\Z/, '') if info[2] info end