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: default_resolve.rb
    path of file: ./repos/graphql-ruby/lib/graphql/schema/build_from_definition/resolve_map
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module GraphQL
  class Schema
    module BuildFromDefinition
      class ResolveMap
        class DefaultResolve
          def initialize(field_map, field_name)
            @field_map = field_map
            @field_name = field_name
          end

 
    
          def call(obj, args, ctx)
            method_name = @field_name
            if !obj.respond_to?(method_name)
              raise KeyError, "Can't resolve field #{method_name} on #{obj.inspect}"
            else
              method_arity = obj.method(method_name).arity
              resolver = case method_arity
              when 0, -1
                # -1 Handles method_missing, eg openstruct
                ->(o, a, c) { o.public_send(method_name) }
              when 1
                ->(o, a, c) { o.public_send(method_name, a) }
              when 2
                ->(o, a, c) { o.public_send(method_name, a, c) }
              else
                raise "Unexpected resolve arity: #{method_arity}. Must be 0, 1, 2"
              end