Feature #6198

public/protected/private with attr_*

Added by riskwa anon about 2 years ago. Updated over 1 year ago.

[ruby-core:43589]
Status:Assigned
Priority:Normal
Assignee:Yukihiro Matsumoto
Category:core
Target version:next minor

Description

I'd like to set visibility like this:

class X
protected attr_accessor :x, :y
end

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

History

#1 Updated by Yusuke Endoh about 2 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 over 1 year ago

  • Target version set to next minor

Also available in: Atom PDF