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