Skip to content

Instantly share code, notes, and snippets.

@threeifbywhiskey
Created March 18, 2014 22:26
Show Gist options
  • Save threeifbywhiskey/9631157 to your computer and use it in GitHub Desktop.
Save threeifbywhiskey/9631157 to your computer and use it in GitHub Desktop.
class String
def >> obj
obj.send self
end
end
class Symbol
def >> obj
obj.send self
end
end
class Array
def >> obj
obj.send *self
end
end
p 'to_i' >> '7'
p :to_s >> 10
p [:+, 7] >> 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment