Actions
Feature #6198
closedpublic/protected/private with attr_*
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
Files
Updated by mame (Yusuke Endoh) over 12 years ago
- Status changed from Open to Assigned
- Assignee set to matz (Yukihiro Matsumoto)
This issue is strongly related to #3753.
--
Yusuke Endoh mame@tsg.ne.jp
Updated by mame (Yusuke Endoh) almost 12 years ago
- Target version set to 2.6
Updated by matz (Yukihiro Matsumoto) almost 6 years ago
- Status changed from Assigned to Rejected
There's no use for private
attr_reader, attr_writer, etc.
And protected
is not encouraged enough for new features. So I reject this.
Matz.
Actions
Like0
Like0Like0Like0Like0