Module: MethodSource::SourceLocation::UnboundMethodExtensions

Includes:
ReeSourceLocation
Included in:
UnboundMethod
Defined in:
lib/method_source/source_location.rb

Instance Method Summary collapse

Instance Method Details

#source_locationArray

Return the source location of an instance method for Ruby 1.8.

Returns:

  • (Array)

    A two element array. First element is the file, second element is the line in the file where the method definition is found.


90
91
92
# File 'lib/method_source/source_location.rb', line 90

def source_location
  to_java.source_location(Thread.current.to_java.getContext())
end