Techniques to avoid duplication on ruby code

The critical thing is to use good names. If you name a method well, then you shouldn’t need to look at its implementation to know what its does.