Method: Concurrent::ImmutableStruct#select
- Defined in:
- lib/concurrent/immutable_struct.rb
#select {|value| ... } ⇒ Array
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`).
68 69 70 71 |
# File 'lib/concurrent/immutable_struct.rb', line 68 def select(&block) return enum_for(:select) unless block_given? ns_select(&block) end |