Rubocop

do not merge yet, just source for discussion.
What about using `tm.values.each do |v|` here?