select(*args) public

Yields each member value from the struct to the block and returns an Array containing the member values from the struct for which the given block returns a true value (equivalent to Enumerable#select).

Lots =, :b, :c, :d, :e, :f)
l =, 22, 33, 44, 55, 66) {|v| v.even? }   #=> [22, 44, 66]
Show source
Register or log in to add new notes.