Method: Weak::Set#replace

Defined in:
lib/weak/set.rb

#replace(enum) ⇒ self

Replaces the contents of ‘self` with the contents of the given enumerable object and returns `self`.

Examples:

set = Weak::Set[1, :c, :s]        #=> #<Weak::Set {1, :c, :s}>
set.replace([1, 2])               #=> #<Weak::Set {1, 2}>
set                               #=> #<Weak::Set {1, 2}>

Returns:

  • (self)

# File 'lib/weak/set.rb', line 202