org.jruby
Class RubyEnumerable

java.lang.Object
  extended by org.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(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject any_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject callEach(Ruby runtime, ThreadContext context, IRubyObject self, BlockCallback callback)
           
static IRubyObject collect(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject count(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject count(ThreadContext context, IRubyObject self, IRubyObject arg, Block block)
           
static RubyModule createEnumerableModule(Ruby runtime)
           
static IRubyObject cycle(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject cycle(ThreadContext context, IRubyObject self, IRubyObject arg, Block block)
           
static IRubyObject detect(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject detect(ThreadContext context, IRubyObject self, IRubyObject ifnone, Block block)
           
static IRubyObject detect19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject detect19(ThreadContext context, IRubyObject self, IRubyObject ifnone, Block block)
           
static IRubyObject drop_while(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject drop(ThreadContext context, IRubyObject self, IRubyObject n, Block block)
           
static IRubyObject each_with_index(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject each_with_index19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_all19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_index(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find_index(ThreadContext context, IRubyObject self, IRubyObject cond, Block block)
           
static IRubyObject find19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject find19(ThreadContext context, IRubyObject self, IRubyObject ifnone, Block block)
           
static IRubyObject first(ThreadContext context, IRubyObject self)
           
static IRubyObject first(ThreadContext context, IRubyObject self, IRubyObject num)
           
static IRubyObject grep(ThreadContext context, IRubyObject self, IRubyObject pattern, Block block)
           
static IRubyObject group_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject include_p(ThreadContext context, IRubyObject self, IRubyObject arg)
           
static IRubyObject inject(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject inject(ThreadContext context, IRubyObject self, IRubyObject init, Block block)
           
static IRubyObject inject19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject inject19(ThreadContext context, IRubyObject self, IRubyObject arg, Block block)
           
static IRubyObject inject19(ThreadContext context, IRubyObject self, IRubyObject init, IRubyObject method, Block block)
           
static IRubyObject max_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject max(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject min_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject min(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject minmax_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject minmax(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject none_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject one_p(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject partition(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject partition19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reject(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reject19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reverse_each19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject reverse_each19(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
           
static IRubyObject select(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject select19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject sort_by(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject sort_by19(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject sort(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject take_while(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject take(ThreadContext context, IRubyObject self, IRubyObject n, Block block)
           
static IRubyObject to_a(ThreadContext context, IRubyObject self)
           
static IRubyObject to_a19(ThreadContext context, IRubyObject self)
           
static IRubyObject to_a19(ThreadContext context, IRubyObject self, IRubyObject[] args)
           
static IRubyObject zip(ThreadContext context, 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)

callEach

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

count

public static IRubyObject count(ThreadContext context,
                                IRubyObject self,
                                Block block)

count

public static IRubyObject count(ThreadContext context,
                                IRubyObject self,
                                IRubyObject arg,
                                Block block)

cycle

public static IRubyObject cycle(ThreadContext context,
                                IRubyObject self,
                                Block block)

cycle

public static IRubyObject cycle(ThreadContext context,
                                IRubyObject self,
                                IRubyObject arg,
                                Block block)

take

public static IRubyObject take(ThreadContext context,
                               IRubyObject self,
                               IRubyObject n,
                               Block block)

take_while

public static IRubyObject take_while(ThreadContext context,
                                     IRubyObject self,
                                     Block block)

drop

public static IRubyObject drop(ThreadContext context,
                               IRubyObject self,
                               IRubyObject n,
                               Block block)

drop_while

public static IRubyObject drop_while(ThreadContext context,
                                     IRubyObject self,
                                     Block block)

first

public static IRubyObject first(ThreadContext context,
                                IRubyObject self)

first

public static IRubyObject first(ThreadContext context,
                                IRubyObject self,
                                IRubyObject num)

to_a

public static IRubyObject to_a(ThreadContext context,
                               IRubyObject self)

to_a19

public static IRubyObject to_a19(ThreadContext context,
                                 IRubyObject self)

to_a19

public static IRubyObject to_a19(ThreadContext context,
                                 IRubyObject self,
                                 IRubyObject[] args)

sort

public static IRubyObject sort(ThreadContext context,
                               IRubyObject self,
                               Block block)

sort_by

public static IRubyObject sort_by(ThreadContext context,
                                  IRubyObject self,
                                  Block block)

sort_by19

public static IRubyObject sort_by19(ThreadContext context,
                                    IRubyObject self,
                                    Block block)

grep

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

detect

public static IRubyObject detect(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

detect

public static IRubyObject detect(ThreadContext context,
                                 IRubyObject self,
                                 IRubyObject ifnone,
                                 Block block)

detect19

public static IRubyObject detect19(ThreadContext context,
                                   IRubyObject self,
                                   Block block)

detect19

public static IRubyObject detect19(ThreadContext context,
                                   IRubyObject self,
                                   IRubyObject ifnone,
                                   Block block)

find19

public static IRubyObject find19(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

find19

public static IRubyObject find19(ThreadContext context,
                                 IRubyObject self,
                                 IRubyObject ifnone,
                                 Block block)

find_index

public static IRubyObject find_index(ThreadContext context,
                                     IRubyObject self,
                                     Block block)

find_index

public static IRubyObject find_index(ThreadContext context,
                                     IRubyObject self,
                                     IRubyObject cond,
                                     Block block)

select

public static IRubyObject select(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

select19

public static IRubyObject select19(ThreadContext context,
                                   IRubyObject self,
                                   Block block)

find_all19

public static IRubyObject find_all19(ThreadContext context,
                                     IRubyObject self,
                                     Block block)

reject

public static IRubyObject reject(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

reject19

public static IRubyObject reject19(ThreadContext context,
                                   IRubyObject self,
                                   Block block)

collect

public static IRubyObject collect(ThreadContext context,
                                  IRubyObject self,
                                  Block block)

inject

public static IRubyObject inject(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

inject

public static IRubyObject inject(ThreadContext context,
                                 IRubyObject self,
                                 IRubyObject init,
                                 Block block)

inject19

public static IRubyObject inject19(ThreadContext context,
                                   IRubyObject self,
                                   Block block)

inject19

public static IRubyObject inject19(ThreadContext context,
                                   IRubyObject self,
                                   IRubyObject arg,
                                   Block block)

inject19

public static IRubyObject inject19(ThreadContext context,
                                   IRubyObject self,
                                   IRubyObject init,
                                   IRubyObject method,
                                   Block block)

partition

public static IRubyObject partition(ThreadContext context,
                                    IRubyObject self,
                                    Block block)

partition19

public static IRubyObject partition19(ThreadContext context,
                                      IRubyObject self,
                                      Block block)

each_with_index

public static IRubyObject each_with_index(ThreadContext context,
                                          IRubyObject self,
                                          Block block)

each_with_index19

public static IRubyObject each_with_index19(ThreadContext context,
                                            IRubyObject self,
                                            Block block)

reverse_each19

public static IRubyObject reverse_each19(ThreadContext context,
                                         IRubyObject self,
                                         Block block)

reverse_each19

public static IRubyObject reverse_each19(ThreadContext context,
                                         IRubyObject self,
                                         IRubyObject[] args,
                                         Block block)

include_p

public static IRubyObject include_p(ThreadContext context,
                                    IRubyObject self,
                                    IRubyObject arg)

max

public static IRubyObject max(ThreadContext context,
                              IRubyObject self,
                              Block block)

max_by

public static IRubyObject max_by(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

min

public static IRubyObject min(ThreadContext context,
                              IRubyObject self,
                              Block block)

min_by

public static IRubyObject min_by(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

minmax

public static IRubyObject minmax(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

minmax_by

public static IRubyObject minmax_by(ThreadContext context,
                                    IRubyObject self,
                                    Block block)

none_p

public static IRubyObject none_p(ThreadContext context,
                                 IRubyObject self,
                                 Block block)

one_p

public static IRubyObject one_p(ThreadContext context,
                                IRubyObject self,
                                Block block)

all_p

public static IRubyObject all_p(ThreadContext context,
                                IRubyObject self,
                                Block block)

any_p

public static IRubyObject any_p(ThreadContext context,
                                IRubyObject self,
                                Block block)

zip

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

group_by

public static IRubyObject group_by(ThreadContext context,
                                   IRubyObject self,
                                   Block block)


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