method
parse_class

v1_9_2_180 -
Show latest stable
-
0 notes -
Class: Ruby
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (38)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
parse_class(container, single, tk, comment)
public
Hide source
# File lib/rdoc/parser/ruby.rb, line 542 def parse_class(container, single, tk, comment) container, name_t = get_class_or_module container case name_t when TkCONSTANT name = name_t.name superclass = "Object" if TkLT === peek_tk then get_tk skip_tkspace superclass = get_class_specification superclass = "<unknown>" if superclass.empty? end cls_type = single == SINGLE ? RDoc::SingleClass : RDoc::NormalClass cls = container.add_class cls_type, name, superclass read_documentation_modifiers cls, RDoc::CLASS_MODIFIERS cls.record_location @top_level cls.comment = comment @stats.add_class cls parse_statements cls when TkLSHFT case name = get_class_specification when "self", container.name parse_statements container, SINGLE when /\A[A-Z]/ other = RDoc::TopLevel.find_class_named name unless other then other = container.add_module RDoc::NormalModule, name other.record_location @top_level other.comment = comment end @stats.add_class other read_documentation_modifiers other, RDoc::CLASS_MODIFIERS parse_statements(other, SINGLE) end else warn("Expected class name or '<<'. Got #{name_t.class}: #{name_t.text.inspect}") end end