Method: ClassSource::MethodIndex#locations
- Defined in:
- lib/class_source/method_index.rb
#locations ⇒ Array
Returns An array of [file_path, line_number] tuples for all unique methods of the class.
10 11 12 13 14 15 16 |
# File 'lib/class_source/method_index.rb', line 10 def locations @locations ||= (unique.map do |m| @target_class.instance_method(m).source_location end + klass.unique.map do |m| @target_class.method(m).source_location end).compact end |