Enumerable Module

Hi
I want know , Which classes in ruby is supported by Enumerable Module ?
thanks

None. ‘supported’ means nothing in ruby.

Enumerable will work with any class that has a meaningful #each method.

– Matma R.

On Aug 25, 2011, at 5:00 AM, amir e. wrote:

Hi
I want know , Which classes in ruby is supported by Enumerable Module ?

If you are asking about which classes include Enumerable, try something
like this on your system:

ObjectSpace.each_object(Class).select { |c| c < Enumerable }
=> [Gem::SourceIndex, IRB::DefaultEncodings, Enumerator::Generator,
Enumerator, Struct::Tms, Dir, File, ARGF.class, IO, Range, Struct, Hash,
Array, BasicSocket, Socket, IPSocket, TCPSocket, TCPServer, UDPSocket,
UNIXSocket, UNIXServer, SortedSet, Set, Struct::Group, Struct::Passwd,
Syck::Set, Syck::Pairs, Syck::Omap, Syck::SpecialHash, StringIO,
CGI::Cookie]

The exact results will differ depending on what gems you have active.

Gary W.