size

e.size â int, Float::INFINITY or nil
Instance Public methods

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
doc_ruby_on_rails
2015-04-05 05:29:15
Comments
Leave a Comment

Please login to continue.