Skip to content

Instantly share code, notes, and snippets.

@fallengiants
Created October 19, 2012 21:08
Show Gist options
  • Select an option

  • Save fallengiants/3920746 to your computer and use it in GitHub Desktop.

Select an option

Save fallengiants/3920746 to your computer and use it in GitHub Desktop.
Ruby symbol to proc inverse
class Symbol
def ~@
_bound = binding
return ->(arg) {_bound.send(self, arg)}
end
end
%w{lib1 lib2 lib3}.map &~:require
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment