Class | Ramaze::AppGraph
In: | lib/ramaze/app_graph.rb
Parent: | Object

The AppGraph class can be used to generate a graph of all the URLs mapped in a Ramaze application and saves this graph as an image.

In order to generate a graph of your application all you need to do is the following:

        require 'ramaze/app_graph'

        graph = Ramaze::AppGraph.new graph.generate graph.show

Once this code is executed you can find the .dot and PNG files in the root directory of your application.

@author Michael Fellinger

### Methods

connect generate new show write_dot

### Public Class methods

new()

Creates a new instance of the class.

@author Michael Fellinger

### Public Instance methods

connect(hash)

Connects various elements in the graph to each other.

@author Michael Fellinger

generate()

Generates the graph based on all the current routes. The graph is saved in the application directory.

@author Michael Fellinger

show()

Generates a PNG file based on the .dot file.

@author Michael Fellinger

write_dot()

Writes the dot file containing the graph data.

@author Michael Fellinger

[Validate]