# File lib/vpim/vcard.rb, line 1272
      def add_x_aim(xaim) # :yield: xaim
        params = {}

        if block_given?
          x = Struct.new( :location, :preferred ).new

          yield x

          x[:preferred] = 'PREF' if x[:preferred]

          types = x.to_a.flatten.compact.map { |s| s.downcase }.uniq

          params['TYPE'] = types if types.first
        end

        @card << Vpim::DirectoryInfo::Field.create( 'X-AIM', xaim, params)
        self
      end