Class: Set
Instance Method Summary collapse
- #&(enum) ⇒ Object (also: #intersection)
Instance Method Details
#&(enum) ⇒ Object Also known as: intersection
2 3 4 5 6 |
# File 'lib/opal/set_patches.rb', line 2 def &(enum) n = self.class.new enum.each { |o| n.add(o) if include?(o) } n end |