You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: schema_diff.rb
    path of file: ./repos/graphiti/lib/graphiti
    
    the code of the file until where you have to start completion: module Graphiti
  class Sc
    
    def compare_resources
      @old[:resources].each_with_index do |r, index|
        new_resource = @new[:resources].find { |n| n[:name] == r[:name] }
        next if new_resource.try(:[], :remote) || r.try(:[], :remote)

        compare_resource(r, new_resource) do
          compare_attributes(r, new_resource)
          compare_defaults(r, new_resource)
          compare_extra_attributes(r, new_resource)
          compare_sorts(r, new_resource)
          compare_filters(r, new_resource)
          compare_filter_group(r, new_resource)
          compare_stats(r, new_resource)
          compare_relationships(r, new_resource)
        end
      end
    end