It very well may be the Blue Buffalo...I have heard of quite a few yorkies having issues with it.
I would not be too worried about him not eating. Probably best for him not to while his tummy is upset. As for the gums, the most important thing to check is to see if they are wet...just lift his upper lip and touch them .. if they are sticky to the touch, chances are he is dehydrated....if wet and slick he is not. That is one way to check for dehydration...you can also pull up the skin on his back between the shoulder blades...if it does not go right back into place he may be dehydrated.
Here is a good link about checking for dehydration:
http://www.wikihow.com/Determine-if-a-Dog-Is-Dehydrated
Hopefully he will be fine later today or tomorrow. If the vomiting continues, you really need to think about getting him to an emergency clinic.