Issue #11689 has been updated by sawa (Tsuyoshi Sawada).


jeremyevans0 (Jeremy Evans) wrote in #note-15:
> I've submitted a pull request that implements @matz's idea of `public?`, `private?`, and `protected?`: https://github.com/ruby/ruby/pull/5040

I see that there is still a comment in the pull request requesting for a single method that covers them.

mame (Yusuke Endoh) wrote in #note-11:
> FYI: The reason why matz does not like the term "visibility", is because the method attribute is not a visibility.  In fact, all methods are visible in Ruby.  Instead, the method attribute restricts how and where it can be called.  We briefly discussed another name candidate at the meeting, but we couldn't find a good name of the concept.  Then matz chose the three methods (public?, etc.) because we can avoid deciding the name.

What about `Method#privacy` and `UnboundMethod#privacy`, then?

----------------------------------------
Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object.
https://bugs.ruby-lang.org/issues/11689#change-94373

* Author: yui-knk (Kaneko Yuichiro)
* Status: Open
* Priority: Normal
----------------------------------------
Add `Method#visibility` and `UnboundMethod#visibility` for getting visibility from Method and UnboundMethod object.
In GitHub https://github.com/ruby/ruby/pull/1098.

---Files--------------------------------
0001-Add-Method-visibility-and-UnboundMethod-visibility.patch (3.11 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>