# module RubyProf::Profile::LegacyMethodElimination

### Public Instance Methods

eliminate_methods!(matchers) click to toggle source

eliminate some calls from the graph by merging the information into callers. matchers can be a list of strings or regular expressions or the name of a file containing regexps.

    # File lib/ruby-prof/profile/legacy_method_elimination.rb, line 6
    def eliminate_methods!(matchers)
      RubyProf.deprecation_warning(
        "Method 'eliminate_methods!' is dprecated",
        "Please call 'exclude_methods!' before starting the profile run instead."
      )
      matchers = read_regexps_from_file(matchers) if matchers.is_a?(String)
      eliminated = []
      threads.each do |thread|
        matchers.each{ |matcher| eliminated.concat(eliminate_methods(thread.methods, matcher)) }
      end
      eliminated
    end