module HTTPX::ArrayExtensions::FilterMap

  1. lib/httpx/extensions.rb

Methods

Public Instance

  1. filter_map

Public Instance methods

filter_map()

Ruby 2.7 backport

[show source]
   # File lib/httpx/extensions.rb
10 def filter_map
11   return to_enum(:filter_map) unless block_given?
12 
13   each_with_object([]) do |item, res|
14     processed = yield(item)
15     res << processed if processed
16   end
17 end