Class: Yml2erd::CLI

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

Defined Under Namespace

Classes: YmlNotFoundError

Instance Method Summary collapse

Instance Method Details

#convert(path) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/yml2erd/cli.rb', line 14

def convert(path)
  abort_if_graphviz_isnt_installed
  schema_structure = load_yml(path)
  opts = {
    output_path: options[:output_path],
    project_name: options[:projectname],
    output_style: options[:outputstyle]
  }
  Yml2erd::Diagram.create(schema_structure, opts)
  puts 'Successfully converted!'
end