instance method
Method#source_location
() -> [ ::String, ::Integer ]?
meth.source_location → [String, Integer, Integer, Integer, Integer]
proc.c
View on GitHub ↗
VALUE
rb_method_location(VALUE method)
{
return method_def_location(rb_method_def(method));
}
Returns the location where the method was defined. The returned Array contains:
(1) the Ruby source filename (2) the line number where the definition starts (3) the column number where the definition starts (4) the line number where the definition ends (5) the column number where the definitions ends
This method will return nil if the method was not defined in Ruby (i.e. native).