Class: Sgviz::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/sgviz/cli.rb

Instance Method Summary collapse

Instance Method Details

#generateObject



70
71
72
73
# File 'lib/sgviz/cli.rb', line 70

def generate
  generator.generate
  puts "Graph generated to `#{options.output_path}.#{options.format}`."
end

#openObject



59
60
61
62
63
64
65
66
# File 'lib/sgviz/cli.rb', line 59

def open
  unless system "which open > /dev/null"
    abort "`open` command not found."
  end

  generate
  system "open #{options.output_path}.#{options.format}"
end

#versionObject



53
54
55
# File 'lib/sgviz/cli.rb', line 53

def version
  puts Sgviz::VERSION
end