class Sgviz::CLI

Public Instance Methods

generate() click to toggle source
# File lib/sgviz/cli.rb, line 70
def generate
  generator.generate
  puts "Graph generated to `#{options.output_path}.#{options.format}`."
end
open() click to toggle source
# 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
version() click to toggle source
# File lib/sgviz/cli.rb, line 53
def version
  puts Sgviz::VERSION
end

Private Instance Methods

generator() click to toggle source
# File lib/sgviz/cli.rb, line 77
def generator
  @generator ||= Sgviz::Generator.new :G, :digraph, options
end