On Fri, 16 May 2003 23:33:21 +0900, Guillaume Marcais wrote:
> On Friday 16 May 2003 03:38 am, you wrote:
>> Can you explain that? What do you mean by "don't fit"?
> I find it more convenient when the scope of the method is directly
> readable from the declaration of the method. In Java,
> public/protected/private are qualifiers:
> 
> private int dontcallme();
> 
> In ruby, I need a second line to specify the scope of the method.
> Or the default scope was change before the method declaration. In
> both cases I have to look around the code to find what the scope
> of the method is.

Not really. Sure, you can do:

  class Foo
    def meth1 ...
    def meth2 ...
    def meth3 ...
    def meth4 ...
    def meth5 ...
    def meth6 ...

    private   :meth3, :meth4
    protected :meth5, :meth6
  end

Or you can do (C++ style):

  class Foo
    def meth1 ...
    def meth2 ...

  private
    def meth3 ...
    def meth4 ...

  protected
    def meth5 ...
    def meth6 ...
  end

-austin
-- Austin Ziegler, austin / halostatue.ca on 2003.05.16 at 13:54:23