Class: Set

Inherits:
Object show all
Defined in:
lib/opal/set_patches.rb

Instance Method Summary collapse

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