Add ruby Residue code