org.jruby
Class RubyEnumerable

java.lang.Object
  extended byorg.jruby.RubyEnumerable

public class RubyEnumerable
extends java.lang.Object

The implementation of Ruby's Enumerable module.


Nested Class Summary
static class RubyEnumerable.AppendBlockCallback
           
 
Constructor Summary
RubyEnumerable()
           
 
Method Summary
static IRubyObject all_p(IRubyObject self, Block block)
           
static IRubyObject any_p(IRubyObject self, Block block)
           
static IRubyObject callEach(Ruby runtime, ThreadContext context, IRubyObject self, BlockCallback callback)
           
static IRubyObject callEachOld(ThreadContext context, IRubyObject self, RubyModule module, BlockCallback bc)
           
static IRubyObject collect(IRubyObject self, Block block)
           
static RubyModule createEnumerableModule(Ruby runtime)
           
static IRubyObject detect(IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject each_with_index(IRubyObject self, Block block)
           
static IRubyObject grep(IRubyObject self, IRubyObject pattern, Block block)
           
static IRubyObject group_by(IRubyObject self, Block block)
           
static IRubyObject include_p(IRubyObject self, IRubyObject arg)
           
static IRubyObject inject(IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject max(IRubyObject self, Block block)
           
static IRubyObject min(IRubyObject self, Block block)
           
static IRubyObject partition(IRubyObject self, Block block)
           
static IRubyObject reject(IRubyObject self, Block block)
           
static IRubyObject select(IRubyObject self, Block block)
           
static IRubyObject sort_by(IRubyObject self, Block block)
           
static IRubyObject sort(IRubyObject self, Block block)
           
static IRubyObject to_a(IRubyObject self)
           
static IRubyObject zip(IRubyObject self, IRubyObject[] args, Block block)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RubyEnumerable

public RubyEnumerable()
Method Detail

createEnumerableModule

public static RubyModule createEnumerableModule(Ruby runtime)

callEachOld

public static IRubyObject callEachOld(ThreadContext context,
                                      IRubyObject self,
                                      RubyModule module,
                                      BlockCallback bc)

callEach

public static IRubyObject callEach(Ruby runtime,
                                   ThreadContext context,
                                   IRubyObject self,
                                   BlockCallback callback)

to_a

public static IRubyObject to_a(IRubyObject self)

sort

public static IRubyObject sort(IRubyObject self,
                               Block block)

sort_by

public static IRubyObject sort_by(IRubyObject self,
                                  Block block)

grep

public static IRubyObject grep(IRubyObject self,
                               IRubyObject pattern,
                               Block block)

detect

public static IRubyObject detect(IRubyObject self,
                                 IRubyObject[] args,
                                 Block block)

select

public static IRubyObject select(IRubyObject self,
                                 Block block)

reject

public static IRubyObject reject(IRubyObject self,
                                 Block block)

collect

public static IRubyObject collect(IRubyObject self,
                                  Block block)

inject

public static IRubyObject inject(IRubyObject self,
                                 IRubyObject[] args,
                                 Block block)

partition

public static IRubyObject partition(IRubyObject self,
                                    Block block)

each_with_index

public static IRubyObject each_with_index(IRubyObject self,
                                          Block block)

include_p

public static IRubyObject include_p(IRubyObject self,
                                    IRubyObject arg)

max

public static IRubyObject max(IRubyObject self,
                              Block block)

min

public static IRubyObject min(IRubyObject self,
                              Block block)

all_p

public static IRubyObject all_p(IRubyObject self,
                                Block block)

any_p

public static IRubyObject any_p(IRubyObject self,
                                Block block)

zip

public static IRubyObject zip(IRubyObject self,
                              IRubyObject[] args,
                              Block block)

group_by

public static IRubyObject group_by(IRubyObject self,
                                   Block block)


Copyright © 2002-2007 JRuby Team. All Rights Reserved.