Use define method instead of class_eval