Created
March 19, 2014 20:08
-
-
Save threeifbywhiskey/9650118 to your computer and use it in GitHub Desktop.
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
module ReverseSend | |
def self.extended klass | |
klass.send(:define_method, '>>') do |obj| | |
obj.send *self | |
end | |
end | |
end | |
class String | |
extend ReverseSend | |
end | |
class Array | |
extend ReverseSend | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment