Class: MOSAIK::Commands::Visualize
- Inherits:
-
MOSAIK::Command::Graph
- Object
- MOSAIK::Command
- MOSAIK::Command::Graph
- MOSAIK::Commands::Visualize
- Defined in:
- lib/mosaik/commands/visualize.rb
Overview
Render graph visualization
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
26 27 28 29 30 31 |
# File 'lib/mosaik/commands/visualize.rb', line 26 def call info "Visualizing graph (#{.map { |k, v| "#{k}: #{v}" }.join(', ')})" # Render graph visualization visualize_graph end |
#validate ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mosaik/commands/visualize.rb', line 14 def validate super raise OptionError, "input file not found: #{[:input]}" unless File.exist? [:input] # Force visualization [:visualize] = true # Remove output file extension [:output] = [:output].sub(/\.\w+$/, "") end |