https://www.webcodegeeks.com/ruby/advanced-enumeration-ruby/
Advanced Enumeration with Ruby