How to Map with Index in Ruby | CodeTrail