Class RDoc::Diagram
In: lib/rdoc/diagram.rb
Parent: Object
CodeObject Include Context Alias Attr AnyMethod Constant Require ClassModule NormalModule SingleClass AnonClass NormalClass TopLevel RubyParser RubyToken RuntimeError Error Error AttributeFormatter AnsiFormatter OverstrikeFormatter HtmlFormatter DefaultDisplay NamedThing IncludedModule Attribute Constant MethodSummary AliasName ClassEntry TopLevelEntry Description MethodDescription ModuleDescription ClassDescription Formatter SimpleFormatter HTML HTMLInOne XML CHM Context Method Class File Element Edge Node Subgraph Digraph SimpleElement Port Options Diagram Fortran95parser RDoc SimpleParser Token Markup TemplatePage Stats C_Parser NameDescriptor Cache Reader Writer Driver MethodEntry RI AllReferences Display Paths RI MarkUp Generator TokenStream ParserFactory DOT RDoc dot/f_4.png

Draw a set of diagrams representing the modules and classes in the system. We draw one diagram for each file, and one for each toplevel class or module. This means there will be overlap. However, it also means that you‘ll get better context for objects.

To use, simply

  d = Diagram.new(info)   # pass in collection of top level infos
  d.draw

The results will be written to the dot subdirectory. The process also sets the diagram attribute in each object it graphs to the name of the file containing the image. This can be used by output generators to insert images.

Methods

draw   new  

Public Class methods

Pass in the set of top level objects. The method also creates the subdirectory to hold the images

Public Instance methods

Draw the diagrams. We traverse the files, drawing a diagram for each. We also traverse each top-level class and module in that file drawing a diagram for these too.

[Validate]