Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • rdoc/code_objects.rb

Files

Class/Module Index [+]

Quicksearch

RDoc::ClassModule

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

Attributes

diagram[RW]
superclass[R]

Public Class Methods

new(name, superclass = nil) click to toggle 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) click to toggle 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() click to toggle source

Return the fully qualified name of this class or module

 
               # 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) click to toggle source
 
               # File rdoc/code_objects.rb, line 573
def http_url(prefix)
  path = full_name.split("::")
  File.join(prefix, *path) + ".html"
end
            
is_module?() click to toggle source

Return true if this object represents a module

 
               # File rdoc/code_objects.rb, line 579
def is_module?
  false
end
            
to_s() click to toggle source

#to_s is simply for debugging

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