Ruby design patterns for study purpose