p = Proc.new do r1 = Record.find 1 r2 = Record.find 2 r3 = Record.find 3 end p.call # ... do some useful stuff ... p.call # do it again!
You need to create an account or log in to post comments to this site.
12374 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
p = Proc.new do r1 = Record.find 1 r2 = Record.find 2 r3 = Record.find 3 end p.call # ... do some useful stuff ... p.call # do it again!
You need to create an account or log in to post comments to this site.