Module: Corefines::Enumerable::MapSend
- Defined in:
- lib/corefines/enumerable.rb
Instance Method Summary collapse
-
#map_send(method_name, *args, &block) ⇒ Enumerable
Sends a message to each element and collects the result.
Instance Method Details
#map_send(method_name, *args, &block) ⇒ Enumerable
Sends a message to each element and collects the result.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/corefines/enumerable.rb', line 131 module MapSend Support.classes_including_module(::Enumerable) do |klass| refine klass do def map_send(method_name, *args, &block) map { |e| e.__send__(method_name, *args, &block) } end end end end |