Replace single line with cleaner, more readable Ruby.