# File lib/mongo_mapper/plugins/keys/key.rb, line 71 def set(value) # Avoid tap here so we don't have to create a block binding. values = type.to_mongo(value) if @typecast values.map { |v| typecast_class.to_mongo(v) } else values end end