Extracts the visibility information for the visibility token tk.
Returns the visibility type (a string), the visibility (a symbol) and
singleton if the methods following should be converted to
singleton methods.
# File lib/rdoc/parser/ruby.rb, line 196
def get_visibility_information tk # :nodoc:
vis_type = tk.name
singleton = false
vis =
case vis_type
when 'private' then :private
when 'protected' then :protected
when 'public' then :public
when 'private_class_method' then
singleton = true
:private
when 'public_class_method' then
singleton = true
:public
when 'module_function' then
singleton = true
:public
else
raise RDoc::Error, "Invalid visibility: #{tk.name}"
end
return vis_type, vis, singleton
end