0×21 – Array#to_proc
17Jul09
class Array
def to_proc
proc do |obj|
self.map { |sym| obj.send(sym) }
end
end
end
gives you
Account.all.map(&%w(id email))
Filed under: Uncategorized | Leave a Comment
No Responses Yet to “0×21 – Array#to_proc”