Method: Enumerable#length

Defined in:
lib/mug/enumerable/hash-like.rb

#lengthObject Also known as: size

Returns the number of key-value pairs in the hash.

@call-seq length -> integer



131
132
133
# File 'lib/mug/enumerable/hash-like.rb', line 131

def length
  reduce(0) {|sum,_| sum + 1 }
end