lib/greygoo/role/storable.rb
def retrieve(key)
					unless key.is_a?(BSON::ObjectId)
						key = BSON::ObjectId.from_string(key)
					end
					result = GreyGoo.sync coll.find_one({:_id => key})
					return result
				end
# Gets the row from the database as a hash
#
# @param [Object] key Either a BSON::ObjectId or a String
# @return [Hash] The hash from the db
Gets the row from the database as a hash
Gets the row from the database as a hash
def retrieve(key)
					unless key.is_a?(BSON::ObjectId)
						key = BSON::ObjectId.from_string(key)
					end
					result = GreyGoo.sync coll.find_one({:_id => key})
					return result
				end
def retrieve ( key ) unless key . is_a? ( BSON :: ObjectId ) key = BSON :: ObjectId . from_string ( key ) end result = GreyGoo . sync coll . find_one ( { :_id => key } ) return result end
Gets the row from the database as a hash
Gets the row from the database as a hash
The hash from the db
The hash from the db
Hash
key
key Either a BSON::ObjectId or a String
key Either a BSON :: ObjectId or a String