Class: RDoc::ClassModule

Class | RDoc::ClassModule
In: | rdoc/code_objects.rb
Parent: | Context

ClassModule is the base class for objects representing either a class or a module.

### Methods

find_class_named full_name http_url is_module? new to_s

### Attributes

diagram | [RW] |
superclass | [R] |

### Public Class methods

new(name, superclass = nil)

[Source]

    # File rdoc/code_objects.rb, line 556
        def initialize(name, superclass = nil)
          @name       = name
          @diagram    = nil
          @superclass = superclass
          @comment    = ""
          super()
        end

### Public Instance methods

find_class_named(name)

[Source]

    # File rdoc/code_objects.rb, line 591
        def find_class_named(name)
          return self if full_name == name
          @classes.each_value {|c| return c if c.find_class_named(name) }
          nil
        end

full_name()

Return the fully qualified name of this class or module

[Source]

    # File rdoc/code_objects.rb, line 565
        def full_name
          if @parent && @parent.full_name
            @parent.full_name + "::" + @name
          else
            @name
          end
        end

http_url(prefix)

[Source]

    # File rdoc/code_objects.rb, line 573
        def http_url(prefix)
          path = full_name.split("::")
          File.join(prefix, *path) + ".html"
        end

is_module?()

Return `true` if this object represents a module

[Source]

    # File rdoc/code_objects.rb, line 579
        def is_module?
          false
        end

to_s()

to_s is simply for debugging

[Source]

    # File rdoc/code_objects.rb, line 584
        def to_s
          res = self.class.name + ": " + @name
          res << @comment.to_s
          res << super
          res
        end

[Validate]