Method: Mongo::Error::UnchangeableCollectionOption#initialize

Defined in:
lib/mongo/error/unchangeable_collection_option.rb

#initialize(option) ⇒ UnchangeableCollectionOption

Create the new exception.

Examples:

Create the new exception.

Mongo::Error::UnchangeableCollectionOption.new(option)

Parameters:

  • option (String, Symbol)

    The option that was attempted to be changed.

Since:

  • 2.1.0



35
36
37
38
# File 'lib/mongo/error/unchangeable_collection_option.rb', line 35

def initialize(option)
  super("The option #{option} cannot be set on a new collection instance." +
            " The options that can be updated are #{Collection::CHANGEABLE_OPTIONS}")
end