Class: MOSAIK::Command::Graph

Inherits:
MOSAIK::Command show all
Defined in:
lib/mosaik/command.rb

Overview

Base class for commands that output graphs

Instance Method Summary collapse

Methods inherited from MOSAIK::Command

#call

Instance Method Details

#validateObject

Raises:



41
42
43
44
45
# File 'lib/mosaik/command.rb', line 41

def validate
  raise OptionError, "unknown format: #{options[:format]}" unless options[:format].in? ["svg", "png"]
  raise OptionError, "unknown renderer: #{options[:renderer]}" unless options[:renderer].in? ["dot", "fdp", "sfdp", "neato"]
  raise OptionError, "output file exists: #{options[:output]}" if File.exist?(options[:output]) && !options[:force]
end