class FRUIT_FACTORY insert FACTORY[APPLE] rename new as new_apple end FACTORY[PEAR] rename new as new_pear end ... end