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: declares_dry_class.rb
    path of file: ./repos/mocktail/lib/mocktail/imitates_type/makes_double
    
    the code of the file until where you have to start completion: require_relative "declares_dry_class/reconstructs_call"

module Mocktail
  class DeclaresDryClass
    extend T::Sig

    DEFAULT_ANCESTORS = Class.new(Object).ancestors[1..]

    def initialize
      @raises_neato_no_method_error = RaisesNeatoNoMethodError.new
      @transforms_params = TransformsParams.new
      @stringifies_method_signature = StringifiesMethodSignature.new
      @grabs_original_method_parameters = GrabsOriginalMethodParameters.new
    end

    def declare(type, instance_methods)
      dry_class = Class.new(Object) {
        include type if type.is_a?(Module) && !type.is_a?(Class)

        define_method :initialize do |*args, **kwargs, &blk|
        end

        [:is_a?, :kind_of?].each do |method_name|
          define_method method_name, ->(thing) {
            # Mocktails extend from Object, so share the same ancestors, plus the passed type
            [type, *DEFAULT_ANCESTORS].include?(thing)
         
    
    def define_double_methods!(dry_class, type, instance_methods)
      instance_methods.each do |method_name|
        dry_class.undef_method(method_name) if dry_class.method_defined?(method_name)
        parameters = @grabs_original_method_parameters.grab(type.instance_method(method_name))
        signature = @transforms_params.transform(Call.new, params: parameters)
        method_signature = @stringifies_method_signature.stringify(signature)
        __mocktail_closure = {
          dry_class: dry_class,
          type: type,
          method: method_name,
          original_method: type.instance_method(method_name),
          signature: signature
        }

        dry_class.define_method method_name,
          eval(<<-RUBBY, binding, __FILE__, __LINE__ + 1) # standard:disable Security/Eval
            ->#{method_signature} do
              ::Mocktail::Debug.guard_against_mocktail_accidentally_calling_mocks_if_debugging!
              ::Mocktail::HandlesDryCall.new.handle(::Mocktail::ReconstructsCall.new.reconstruct(
                double: self,
                call_binding: __send__(:binding),
                default_args: (__send__(:binding).local_variable_defined?(:__mocktail_default_args) ? __send__(:binding).local_variable_get(:__mocktail_default_args) : {}),
                **__mocktail_closure
              ))
            end
          RUBBY
      end
    end