Enumerable#find_all

来源:互联网 发布:捕鱼达人 知乎 编辑:程序博客网 时间:2024/06/04 18:46
require "PP"
PP::pp((1..10).find_all {|i|
i % 3 == 0
}) # [3, 6, 9]
 
原创粉丝点击