def with(new_options)
      new_options.keys.each do |k|
        raise Error::UnchangeableCollectionOption.new(k) unless CHANGEABLE_OPTIONS.include?(k)
      end
      Collection.new(database, name, options.merge(new_options))
    end
def with(new_options)
      new_options.keys.each do |k|
        raise Error::UnchangeableCollectionOption.new(k) unless CHANGEABLE_OPTIONS.include?(k)
      end
      Collection.new(database, name, options.merge(new_options))
    end
Provides a new collection with either a new read preference or new write concern
 merged over the existing read preference / write concern.

 @example Get a collection with changed read preference.
   collection.with(:read => { :mode => :primary_preferred })

 @example Get a collection with changed write concern.
   collection.with(:write => { w:  3 })
 @param [ Hash ] new_options The new options to use.

 @return [ Mongo::Collection ] A new collection instance.

 @since 2.1.0