Method: RDoc::Parser::Ruby#parse_constant_visibility

Defined in:
lib/rdoc/parser/ruby.rb

#parse_constant_visibility(container, single, tk) ⇒ Object

Parses a Module#private_constant or Module#public_constant call from tk.



2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
# File 'lib/rdoc/parser/ruby.rb', line 2058

def parse_constant_visibility(container, single, tk)
  args = parse_symbol_arg
  case tk[:text]
  when 'private_constant'
    vis = :private
  when 'public_constant'
    vis = :public
  else
    raise RDoc::Error, 'Unreachable'
  end
  container.set_constant_visibility_for args, vis
end