ClassModule is the base class for objects representing either a class or a module.
# 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
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
# File rdoc/code_objects.rb, line 573
def http_url(prefix)
path = full_name.split("::")
File.join(prefix, *path) + ".html"
end
Return true if this object represents a module
# File rdoc/code_objects.rb, line 579
def is_module?
false
end
#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
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.