Avaamo interview question

Implement .each() method on Ruby on Rails