Replace personal refactoring with ruby refactoring