Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

&method

View amperstand.rb
1 2 3 4 5 6
# From : http://andrewjgrimm.wordpress.com/2011/10/03/in-ruby-method-passes-you/
 
["1", "2", "3"].map(&method(:Integer))
 
filenames = ["a.txt", "b.txt", "c.txt"]
texts = filenames.map(&File.method(:read))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.