# File lib/neovim/ruby_provider.rb, line 28
    def self.__define_setup(plug)
      plug.__send__(:setup) do |client|
        $stdout.define_singleton_method(:write) do |string|
          client.out_write(string)
        end

        $stderr.define_singleton_method(:write) do |string|
          client.report_error(string)
        end

        begin
          cid = client.channel_id
          client.command("au DirChanged * call rpcrequest(#{cid}, 'ruby_chdir', v:event)")
        rescue ArgumentError
          # Swallow this exception for now. This means the nvim installation is
          # from before DirChanged was implemented.
        end
      end
    end