23 Feb '12, 1pm

MicroGems: five minute RubyGems - Jeff Kreeftmeijer:

MicroGems: five minute RubyGems - Jeff Kreeftmeijer:

← Jeff Kreeftmeijer Archive Contact MicroGems: five minute RubyGems 03 Oct 2011 tweet! subscribe! Note: This is just something I've been playing around with. I'm not saying you should do this and I'm not implying this is better than what you're doing right now. I'm just sharing some experiences from a quick experiment. For Codebrawl , I created a library that could take a method from a model – like calculate_score for example – and give it a corresponding bang method – calculate_score! in this case – that saves the results using a simple update_attribute call. In your model, I can just do this: class User bang :calculate_score => :score def calculate_score 100 # Removed fancy logic for presentational purposes end end Now, calling calculate_score! will save the results of calculate_score to the score attribute. It’s one 4-line method in one file and it has a 25-line spec. S...

Full article: http://jeffkreeftmeijer.com/2011/microgems-five-minute-ru...

Tweets

Fun to hear us bickering on the radio Minute 28

monocle.com 26 Feb '12, 4am

requires JavaScript. We recommend browsers which support native audio playback such as Safari or Firefox . Alternatively, ...

Five For Friday — February 20-24

searchmarketingstandard.com 24 Feb '12, 8pm

Five For Friday — February 20-24 0 by Frances Mary Krug in News on , New to the Search Marketing Standard Blog? Subscribe ...

Why aren't you using git-flow?

jeffkreeftmeijer.com 25 Feb '12, 11am

In January of this year, @nvie published “A successful Git branching model” , in which he explained how he keeps his Git r...

don't forget to sign your gems

docs.rubygems.org 04 Mar '12, 8pm

NoSecurity – Well, no security at all. Signed packages are treated like unsigned packages. LowSecurity – Pretty much no se...

Five Ways 2012 Academy Awards are Going Green.

ecorazzi.com 23 Feb '12, 4pm

One of the most prestigious entertainment award shows is right around the corner. Actors, actresses, directors, writers an...

Gingrich, Here’s Five More Things You Can Fit I...

greencarreports.com 22 Feb '12, 7pm

I think you are wasting your time with Gingrich. If he thinks you are trying to build up Government Motors, he instantly b...

Liveblogging the #NERBC - up to the minute photos and notes, updated all day long

Liveblogging the #NERBC - up to the minute phot...

sprudge.com 25 Feb '12, 3pm

Our coverage made possible by Dallis Bros. Coffee. The NERBC is live as hell! Reporting from the 11th floor midtown Manhat...

Najciekawsze aukcje last minute: kapiszony.pl

aftermarket.pl 26 Feb '12, 11am

» Co to jest aukcja (informacje dla kupujących)? » Co to jest aukcja First Minute (informacje dla kupujących)? » Co to jes...