Module: MethodSource::SourceLocation::MethodExtensions

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

Instance Method Summary collapse

Instance Method Details

#source_locationArray

Return the source location of a 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.



20
21
22
# File 'lib/method_source/source_location.rb', line 20

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