Class: ModelVisualizer

Inherits:
Object
  • Object
show all
Defined in:
lib/model-visualizer.rb

Class Method Summary collapse

Class Method Details

.runObject

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



8
9
10
11
12
13
14
15
16
17
18
# 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
end