Module: Enumerable

Defined in:
lib/cocoapods-spm/compatibility/rb26.rb

Instance Method Summary collapse

Instance Method Details

#filter_mapObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/cocoapods-spm/compatibility/rb26.rb', line 3

def filter_map
  return enum_for(:filter_map) unless block_given?

  result = []
  each do |element|
    value = yield(element)
    result << value if value
  end
  result
end