elements.each(*p) Tweet
ruby / patterns
I often use
ary.map(&:upcase)
instead of
ary.map { |a| a.upcase }
But what can I do to use the elements as param as in the following code?
ary.each { |a| p a }
Share
Previous Strategy pattern pattern pattern pattern