This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Symbol | |
# Allows to pass args to &:method_name like so: | |
# [1.234, 2.345, 3.456].map &:round.(2) => [1.23, 2.34, 3.45] | |
def call(*args) | |
proc do |receiver| | |
receiver.send(self, *args) | |
end | |
end | |
end |