Class: NetworkDrawer::Cli
- Inherits:
-
Thor
- Object
- Thor
- NetworkDrawer::Cli
- Defined in:
- lib/network_drawer/cli.rb
Overview
Cli for NetworkDrawer
Instance Method Summary collapse
Instance Method Details
#draw(source_file) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/network_drawer/cli.rb', line 15 def draw(source_file) src = Source.read(source_file) op = {} op = { style: Source.read([:style]) } if [:style] op.merge!(layout: [:layout]) op.merge!(format: [:format]) dest_file = source_file.gsub(File.extname(source_file), '') Diagram.draw(src, dest_file, op) end |