Use class_exec instead of class_eval.