星期一, 九月 07, 2009

Output of an Array to sentence, the ruby way

@contacts.collect{|s| s.name}.to_sentence.concat(".")


--
Liu Lantao
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.com/ .
------

0 条评论:

发表评论

懒桃儿祝大家生活愉快!欢迎大家在此处发表评论:

订阅 博文评论 [Atom]

<< 主页