method

definition_for

rails latest stable - Class: Rails::Filter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.0.0.1) is shown here.

definition_for(method)
private

No documentation available.

# File railties/lib/rails/test_unit/line_filtering.rb, line 71
      def definition_for(method)
        file, start_line = method.source_location
        end_line = method.source.count("\n") + start_line - 1

        return file, start_line..end_line
      end