Class: BSON::ObjectId

Inherits:
Object show all
Defined in:
lib/mongo_doc/ext/object_id.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cast_from_string(string) ⇒ Object



7
8
9
# File 'lib/mongo_doc/ext/object_id.rb', line 7

def self.cast_from_string(string)
  ObjectId.from_string(string) unless string.blank?
end

Instance Method Details

#to_bson(*args) ⇒ Object



3
4
5
# File 'lib/mongo_doc/ext/object_id.rb', line 3

def to_bson(*args)
  self
end