Skip to content

Instantly share code, notes, and snippets.

@threeifbywhiskey
Created March 19, 2014 20:08
Show Gist options
  • Save threeifbywhiskey/9650118 to your computer and use it in GitHub Desktop.
Save threeifbywhiskey/9650118 to your computer and use it in GitHub Desktop.
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