To figure out oxidation states in covalent compounds, you subbract the number of valence electrons that atom has while participating in bonding from its normal valence electrons. Bonding valence electrons are determined for an atom is assigned by electronegativity. If the atom(s) bonded to the reference atom is more electronegative, all of the electrons in the bond are included in its "bonding valence electrons count". So for the carbon in methane, the number of valence electrons is 8, since carbon is more electrctronegative than carbon. Normally, carbon has 4 valence electrons so 4-8 is -4. So carbon in methane has a oxidation state of -4.
For methanol, the carbon has 6 bonding valence electrons (from its bonds with hydrogen). Since oxygen is more electronegative, it claims the electrons for its bonding valence electron count. So for carbon 4-6=-2. For oxygen, 6-8 is also -2. Therefore if you convert methane to methanol, you are oxidizing the carbon atom since its oxidation state is getting more positive. In essence, OILRIG still holds because when you add oxygen to a carbon atom, the bonding electrons will spend more time around the oxygen, so you are zapping electron density away from the carbon. The opposite is true when you add hydrogen to carbon, the electrons will spend slightly more time near carbon or carbon will have more electron density.
The method I outlined above is generally an attempt to extend the assignment of oxidation states for elements in ionic bonds to covalently bonded elements.
Hope that helps some.