method

size

Importance_1
v2_6_3 - Show latest stable - 0 notes - Class: Enumerator
size() public

Returns the size of the enumerator, or nil if it can’t be calculated lazily.

(1..100).to_a.permutation(4).size # => 94109400
loop.size # => Float::INFINITY
(1..100).drop_while.size # => nil
Show source
Register or log in to add new notes.