Feature #6198

public/protected/private with attr_*

Added by riskwa anon over 3 years ago. Updated about 3 years ago.

Assignee:Yukihiro Matsumoto


I'd like to set visibility like this:

class X
protected attr_accessor :x, :y

attached patch(for 1.9.3-p125) is sample implementation (it seems to pass test-all)
- make attr_* to return array of method-symbols which attr_* concerns (e.g. [:x, :x=, :y, :y=])
- make public/protected/private to accept array of symbols

0000-attr-with-visibility.patch Magnifier (8.32 KB) riskwa anon, 03/25/2012 02:58 AM

Related issues

Related to Ruby trunk - Feature #3753: value of def-expr Closed 08/28/2010
Duplicated by Ruby trunk - Feature #6470: Make attr_accessor return the list of generated method Assigned 05/20/2012


#1 Updated by Yusuke Endoh over 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Yukihiro Matsumoto

This issue is strongly related to #3753.

Yusuke Endoh mame@tsg.ne.jp

#2 Updated by Yusuke Endoh about 3 years ago

  • Target version set to next minor

Also available in: Atom PDF