- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indication to identify protected and private methods #1372
Comments
Yes I can see the CSS class A
protected
def a; end
def b; end
private
def c; end
def d; end
end but instead this one: class A
def a; end
def b; end
def c; end
def d; end
protected :a, :b
private :c, :d
end Which is valid ruby and totally works as expected Also I don't know if it matters but I'm in So I have class A
class << self
def a; end
def b; end
def c; end
def d; end
protected :a, :b
private :c, :d
end
end |
I just tried class A
class << self
def a; end
def b; end
protected
def c; end
def d; end
end
end Only a & b are show (which confirms that the alternative syntax shown earlier is not supported by yard) but even using the "classic" syntax seems to be bugged inside class methods but adding It seems that whatever the syntax is Now if I tried to add the visibility and scope tags as a workaround, it hides the method even when # @!scope class
# @!visibility protected |
I'll me my repository public soon so you can see the real code. |
Source: https://github.com/sec-it/pass-station @lsegal I can confirms that protected badge is displayed only for instance methods and not for class methods. |
--protected
and--private
ofyard doc
show protected and private methods on the documentation.But once you have enabled them, you have public, protected and privates methods all mixed without a way to know which is what.
It would be nice to have a little badge next to protected and private methods to allow to identify them.
Expected result
Something like that
The text was updated successfully, but these errors were encountered: