method
parse_visibility
v1_8_7_330 -
Show latest stable
- Class:
RDoc::RubyParser
parse_visibility(container, single, tk)private
No documentation available.
# File lib/rdoc/parsers/parse_rb.rb, line 2482
def parse_visibility(container, single, tk)
singleton = (single == SINGLE)
vis = case tk.name
when "private" then :private
when "protected" then :protected
when "public" then :public
when "private_class_method"
singleton = true
:private
when "public_class_method"
singleton = true
:public
else raise "Invalid visibility: #{tk.name}"
end
skip_tkspace_comment(false)
case peek_tk
# Ryan Davis suggested the extension to ignore modifiers, because he
# often writes
#
# protected unless $TESTING
#
when TkNL, TkUNLESS_MOD, TkIF_MOD
# error("Missing argument") if singleton
container.ongoing_visibility = vis
else
args = parse_symbol_arg
container.set_visibility_for(args, vis, singleton)
end
end