Method: BSON::Object#to_bson_key
- Defined in:
- lib/bson/object.rb
#to_bson_key ⇒ Object
Objects that don’t override this method will raise an error when trying to use them as keys in a BSON document. This is only overridden in String and Symbol.
36 37 38 |
# File 'lib/bson/object.rb', line 36 def to_bson_key raise Error::InvalidKey.new(self) end |