module HTTPX::ArrayExtensions::Intersect

  1. lib/httpx/extensions.rb

Methods

Public Instance

  1. intersect?

Public Instance methods

intersect?(arr)

Ruby 3.1 backport

[show source]
   # File lib/httpx/extensions.rb
24 def intersect?(arr)
25   if size < arr.size
26     smaller = self
27   else
28     smaller, arr = arr, self
29   end
30   (arr & smaller).size > 0
31 end