Shorthand for passing each item in an enumerable to another method

Viewed 48

Is there a nicer way to write something like:

array.each { |item| method(item) }

I'm aware of array.each(&:method) which calls the method on each item, but is there a similar shorthand for calling a method with each item?

0 Answers
Related