method

do_classes

Importance_0
v1_9_2_180 - Show latest stable - 0 notes - Class: C
do_classes() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/parser/c.rb, line 138
  def do_classes
    @content.scan(/(\w+)\s* = \s*rb_define_module\s*\(\s*"(\w+)"\s*\)/x) do
      |var_name, class_name|
      handle_class_module(var_name, "module", class_name, nil, nil)
    end

    # The '.' lets us handle SWIG-generated files
    @content.scan(/([\w\.]+)\s* = \s*rb_define_class\s*
              \(
                 \s*"(\w+)",
                 \s*(\w+)\s*
              \)/x) do |var_name, class_name, parent|
      handle_class_module(var_name, "class", class_name, parent, nil)
    end

    @content.scan(/(\w+)\s*=\s*boot_defclass\s*\(\s*"(\w+?)",\s*(\w+?)\s*\)/) do
      |var_name, class_name, parent|
      parent = nil if parent == "0"
      handle_class_module(var_name, "class", class_name, parent, nil)
    end

    @content.scan(/(\w+)\s* = \s*rb_define_module_under\s*
              \(
                 \s*(\w+),
                 \s*"(\w+)"
              \s*\)/x) do |var_name, in_module, class_name|
      handle_class_module(var_name, "module", class_name, nil, in_module)
    end

    @content.scan(/([\w\.]+)\s* = \s*rb_define_class_under\s*
              \(
                 \s*(\w+),
                 \s*"(\w+)",
                 \s*([\w\*\s\(\)\.\->]+)\s*  # for SWIG
              \s*\)/x) do |var_name, in_module, class_name, parent|
      handle_class_module(var_name, "class", class_name, parent, in_module)
    end
  end
Register or log in to add new notes.