Method: Set#intersect?
- Defined in:
- lib/set.rb
#intersect?(set) ⇒ Boolean
473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/set.rb', line 473 def intersect?(set) case set when Set if size < set.size any?(set) else set.any?(self) end when Enumerable set.any?(self) else raise ArgumentError, "value must be enumerable" end end |