Method: Weak::Map#each_key

Defined in:
lib/weak/map.rb

#each_key {|key| ... } ⇒ self, Enumerator

Calls the given block once for each live key in ‘self`, passing the key as a parameter. Returns the weak map itself.

If no block is given, an ‘Enumerator` is returned instead.

Yields:

  • (key)

    calls the given block once for each key in ‘self`

Yield Parameters:

  • key (Object)

    the key of the current key-value pair

Returns:

  • (self, Enumerator)

    ‘self` if a block was given or an `Enumerator` if no block was given.


# File 'lib/weak/map.rb', line 242