module Enumerable
Public Instance Methods
length()
click to toggle source
Fixnum()
Return the number of elements of the Enumerable. Same as size but not all Enumerables implement size.
# File lib/rgl/enumerable_ext.rb, line 10 def length inject(0) do |sum, v| sum + 1 end end