26 May '13, 4am

@zoevkay ALSO more importantly... look what I found coincidentally. Array#wrap! Just what we needed!

Wraps its argument in an array unless it is already an array (or array-like). Specifically: If the argument is nil an empty list is returned. Otherwise, if the argument responds to to_ary it is invoked, and its result returned. Otherwise, returns an array with the argument as its single element. ::wrap # => [] ::wrap ([1, 2, 3]) # => [1, 2, 3] ::wrap # => [0] This method is similar in purpose to Kernel#Array , but there are some differences: If the argument responds to to_ary the method is invoked. Kernel#Array moves on to try to_a if the returned value is nil , but Array.wrap returns such a nil right away. If the returned value from to_ary is neither nil nor an Array object, Kernel#Array raises an exception, while Array.wrap does not, it just returns the value. It does not call to_a on the argument, though special-cases nil to return an empty array. The last point is part...

Full article: http://api.rubyonrails.org/classes/Array.html#method-c-wrap

Tweets

#Psychographics Deconstructed: What We Look Like to Facebook Marketers #AIO

#Psychographics Deconstructed: What We Look Lik...

seomoz.org 25 May '13, 3pm

For those of you who were at this year's MozCon , this post is the punch line to my presentation (download it here ). If y...