method
handle_class_module
v1_9_1_378 -
Show latest stable
-
0 notes -
Class: C
- 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?
handle_class_module(var_name, class_mod, class_name, parent, in_module)
public
Hide source
# File lib/rdoc/parser/c.rb, line 462 def handle_class_module(var_name, class_mod, class_name, parent, in_module) parent_name = @known_classes[parent] || parent if in_module enclosure = @classes[in_module] || @@enclosure_classes[in_module] unless enclosure if enclosure = @known_classes[in_module] handle_class_module(in_module, (/^rb_m/ =~ in_module ? "module" : "class"), enclosure, nil, nil) enclosure = @classes[in_module] end end unless enclosure warn("Enclosing class/module '#{in_module}' for " + "#{class_mod} #{class_name} not known") return end else enclosure = @top_level end if class_mod == "class" then full_name = enclosure.full_name.to_s + "::#{class_name}" if @content =~ %{Document-class:\s+#{full_name}\s*<\s+([:,\w]+)} then parent_name = $1 end cm = enclosure.add_class RDoc::NormalClass, class_name, parent_name @stats.add_class cm else cm = enclosure.add_module RDoc::NormalModule, class_name @stats.add_module cm end cm.record_location(enclosure.toplevel) find_class_comment(cm.full_name, cm) @classes[var_name] = cm @@enclosure_classes[var_name] = cm @known_classes[var_name] = cm.full_name end