In article <ly8ze4hu7c.fsf / leia.mandrakesoft.com>,
Pixel  <pixel / mandrakesoft.com> wrote:
> Massimiliano Mirra <list / chromatic-harp.com> writes:
> 
> > Is anybody aware of Emacs minor modes that could be adapted to
> > auto-fold method definitions?  I.e. something like this:
> 
> [...]
> 
> > Would be shown like this:
> > 
> > class Foo
> >   def initialize
> >   def bar
> > end
> 
> M-3 C-x $   (set-selective-display)

Also, M-x hs-minor-mode would do exactly what you're after, but
ruby-mode doesn't appear to support it yet.  It should be fairly
simple to make it work though; I think you'd only need to add
something to ruby-mode.el which adds the appropriate entry to
hs-special-modes-alist.