Flowdock
method

size

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

Returns the number of elements in the range. Both the begin and the end of the Range must be Numeric, otherwise nil is returned.

(10..20).size    #=> 11
('a'..'z').size  #=> nil
(-Float::INFINITY..Float::INFINITY).size #=> Infinity
Show source
Register or log in to add new notes.