Flowdock
method

draw_module

Importance_0
v1_8_7_72 - Show latest stable - 0 notes - Class: RDoc::Diagram
draw_module(mod, graph, toplevel = false, file = nil) private

No documentation

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

Hide source
# File lib/rdoc/diagram.rb, line 125
    def draw_module(mod, graph, toplevel = false, file = nil)
      return if  @done_modules[mod.full_name] and not toplevel

      @counter += 1
      url = mod.http_url("classes")
      m = DOT::DOTSubgraph.new('name' => "cluster_#{mod.full_name.gsub( /:/,'_' )}",
                               'label' => mod.name,
                               'fontname' => FONT,
                               'color' => 'blue', 
                               'style' => 'filled', 
                               'URL'   => %{"#{url}"},
                               'fillcolor' => toplevel ? 'palegreen1' : 'palegreen3')
      
      @done_modules[mod.full_name] = m
      add_classes(mod, m, file)
      graph << m

      unless mod.includes.empty?
        mod.includes.each do |m|
          m_full_name = find_full_name(m.name, mod)
          if @local_names.include?(m_full_name)
            @global_graph << DOT::DOTEdge.new('from' => "#{m_full_name.gsub( /:/,'_' )}",
                                      'to' => "#{mod.full_name.gsub( /:/,'_' )}",
                                      'ltail' => "cluster_#{m_full_name.gsub( /:/,'_' )}",
                                      'lhead' => "cluster_#{mod.full_name.gsub( /:/,'_' )}")
          else
            unless @global_names.include?(m_full_name)
              path = m_full_name.split("::")
              url = File.join('classes', *path) + ".html"
              @global_graph << DOT::DOTNode.new('name' => "#{m_full_name.gsub( /:/,'_' )}",
                                        'shape' => 'box',
                                        'label' => "#{m_full_name}",
                                        'URL'   => %{"#{url}"})
              @global_names << m_full_name
            end
            @global_graph << DOT::DOTEdge.new('from' => "#{m_full_name.gsub( /:/,'_' )}",
                                      'to' => "#{mod.full_name.gsub( /:/,'_' )}",
                                      'lhead' => "cluster_#{mod.full_name.gsub( /:/,'_' )}")
          end
        end
      end
    end
Register or log in to add new notes.