refac ruby