Module: MethodSource::SourceLocation::MethodExtensions

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.



9
10
11
# File 'lib/method_source/source_location.rb', line 9

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