Class: PuppetGraph::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet-graph/cli.rb

Instance Method Summary collapse

Instance Method Details

#run(args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/puppet-graph/cli.rb', line 6

def run(args)
  parser.parse!(args)

  validate_options

  g = PuppetGraph::Grapher.new
  g.fact_overrides = options[:fact]
  g.modulepath = options[:modulepath]
  g.code = options[:code]
  g.draw(options[:format], options[:output_file])
end