lib/inkscape_merge/processor.rb
# Validate options and give error if something is missing
Validate options and give error if something is missing
Validate options and give error if something is missing
def validate_options
        unless File.executable? @options.inkscape
          raise ArgumentError, "Inkscape not found or not executable"
        end
        unless @options.svg_file
          raise ArgumentError, "SVG file must be given"
        end
        unless @options.data_file
          raise ArgumentError, "Data-file must be given"
        end
        unless @options.output
          raise ArgumentError, "Output pattern must be given"
        else
          @options.output = File.absolute_path(@options.output)
        end
      end
def validate_options unless File . executable? @options . inkscape raise ArgumentError , "Inkscape not found or not executable" end unless @options . svg_file raise ArgumentError , "SVG file must be given" end unless @options . data_file raise ArgumentError , "Data-file must be given" end unless @options . output raise ArgumentError , "Output pattern must be given" else @options . output = File . absolute_path ( @options . output ) end end
Validate options and give error if something is missing
Validate options and give error if something is missing
# TODO: replace with # If inkscape can not be found or run, bail out # Ensure absolute pathname