Method: Weak::Map::AbstractStrongKeys#size

Defined in:
lib/weak/map/abstract_strong_keys.rb

#sizeInteger

Returns the number of live key-value pairs in self.

Returns:

  • (Integer)

    the number of live key-value pairs in self



25
26
27
# File 'lib/weak/map/abstract_strong_keys.rb', line 25

def size
  each_key.count
end