Hi
I want know , Which classes in ruby is supported by Enumerable Module ?
thanks
···
--
Posted via http://www.ruby-forum.com/.
Hi
I want know , Which classes in ruby is supported by Enumerable Module ?
thanks
--
Posted via http://www.ruby-forum.com/.
None. 'supported' means nothing in ruby.
--
Posted via http://www.ruby-forum.com/.
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 Wright
On Aug 25, 2011, at 5:00 AM, amir e. wrote:
Enumerable will work with any class that has a meaningful #each method.
-- Matma Rex