class NetworkDrawer::Cli
Cli
for NetworkDrawer
Public Instance Methods
draw(source_file)
click to toggle source
# File lib/network_drawer/cli.rb, line 15 def draw(source_file) src = Source.read(source_file) op = {} op = { style: Source.read(options[:style]) } if options[:style] op.merge!(layout: options[:layout]) op.merge!(format: options[:format]) dest_file = source_file.gsub(File.extname(source_file), '') Diagram.draw(src, dest_file, op) end