ruby array each single line code example Example: one line each loop ruby cats.each { |cat| cat.name }