Ruby Refactoring