Vincent Tsao's Library tagged → View Popular, Search in Google
Sep
15
2009
-
Procs play the role of functions in Ruby. It is more accurate to call them function objects, since like everything in Ruby they are objects. Such objects have a name in the folklore - functors. A functor is defined as an object to be invoked or called as if it were an ordinary function, usually with the same syntax, which is exactly what a Proc is.
-
Actually, there are two slight differences between
lambdaandProc.new. First, argument checking. The Ruby documentation forlambdastates: Equivalent to Proc.new, except the resulting Proc objects check the number of parameters passed when called.. Here is an example to demonstrate this: - 6 more annotation(s)...
Jul
9
2007
-
As you can see, there is only one step to get access to your models, the "=> :environment" thing:
-
- task(:send_expire_soon_emails => :environment) do
As you can see, there is only one step to get access to your models, the "=> :environment" thing:
To run this task on my development db I would run "rake utils:send_expire_soon_emails". If I wanted to run this on my production database, I would run "rake RAILS_ENV=production utils:send_expire_soon_emails".
- 1 more annotation(s)...
Selected Tags
Related Tags
Top Contributors
Groups interested in tutorial
Related Lists on Diigo
-
Poster Ideas
photoshop Tutorials , Ideas,...
Items: 9 | Visits: 220
Created by: marco flores
-
Screencast/Tutorial Software
Items: 13 | Visits: 224
Created by: Darren Draper
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo

