class ModelVisualizer

Public Class Methods

run() click to toggle source

Entry point into the gem. Runs the parser and visualizer to generate the full visualization.

# File lib/model-visualizer.rb, line 8
def self.run
    # Poor man's option parsing
    if ARGV.length > 1
        abort 'Usage: model-visualizer [path]'
    end

    root = if ARGV.length == 1 then ARGV[0] else '.' end

    models = Parser.parse root
    Visualizer.new(models).create_visualization(File.basename root)
end