Class: MOSAIK::Command::Graph
- Inherits:
-
MOSAIK::Command
- Object
- MOSAIK::Command
- MOSAIK::Command::Graph
- Defined in:
- lib/mosaik/command.rb
Overview
Base class for commands that output graphs
Direct Known Subclasses
MOSAIK::Commands::Evaluate, MOSAIK::Commands::Extract, MOSAIK::Commands::Identify, MOSAIK::Commands::Visualize
Instance Method Summary collapse
Methods inherited from MOSAIK::Command
Instance Method Details
#validate ⇒ Object
41 42 43 44 45 |
# File 'lib/mosaik/command.rb', line 41 def validate raise OptionError, "unknown format: #{[:format]}" unless [:format].in? ["svg", "png"] raise OptionError, "unknown renderer: #{[:renderer]}" unless [:renderer].in? ["dot", "fdp", "sfdp", "neato"] raise OptionError, "output file exists: #{[:output]}" if File.exist?([:output]) && ![:force] end |