On 5/19/06, gwtmp01 / mac.com <gwtmp01 / mac.com> wrote:
> Is there any existing (or previously proposed) way of 'scoping' the
> behavior
> of private?  I'm thinking something like:
>
> class A
>    attr_accessor :a
>    private {
>      attr_accessor :b
>    }
> end
>
> I'm aware that you can 'toggle' visibility:
>
> class A
>    attr_accessor :a   # public
>    private
>    attr_accessor :b   # private
>    public
>    attr_accessor :c   # public
> end
>
> but it would seem some sort of block/scope notation would be cleaner.

No, there isn't. Why would you want that? I see no advantage to it,
and it's odd. I prefer this, though:

  class A
    attr_accessor :a, :b, :c
    private :b, :b=
  end

-austin
-- 
Austin Ziegler * halostatue / gmail.com
               * Alternate: austin / halostatue.ca