def delete(table, ids, options = {})
      range_key = options[:range_key] # array of range keys that matches the ids passed in
      if ids.respond_to?(:each)
        ids = if range_key.respond_to?(:each)
                # turn ids into array of arrays each element being hash_key, range_key
                ids.each_with_index.map { |id, i| [id, range_key[i]] }
              else
                range_key ? ids.map { |id| [id, range_key] } : ids
              end

        batch_delete_item(table => ids)
      else
        delete_item(table, ids, options)
      end
    end
def delete(table, ids, options = {})
      range_key = options[:range_key] # array of range keys that matches the ids passed in
      if ids.respond_to?(:each)
        ids = if range_key.respond_to?(:each)
                # turn ids into array of arrays each element being hash_key, range_key
                ids.each_with_index.map { |id, i| [id, range_key[i]] }
              else
                range_key ? ids.map { |id| [id, range_key] } : ids
              end

        batch_delete_item(table => ids)
      else
        delete_item(table, ids, options)
      end
    end
Delete an item from a table.

 @param [String] table the name of the table to write the object to
 @param [Array] ids to delete, can also be a string of just one id
 @param [Array] range_key of the record to delete, can also be a string of just one range_key