I wonder if Ruby has something like implicit block parameters or wildcards as in Scala that can be bound and used in further execution like this:
my_collection.each { puts _ }
or
my_collection.each { puts }
There's something like symbol to proc that invokes some method on each element from collection like: array_of_strings.each &:downcase, but I don't want to execute object's method in a loop, but execute some function with this object as a parameter:
my_collection.each { my_method(_) }
instead of:
my_collection.each { |f| my_method(f) }
Is there any way to do that in Ruby?