lib/gnuplotrb/mixins/option_handling.rb
##
# Check if given options are valid for gnuplot.
# Raises ArgumentError if invalid options found.
# Now checks only terminal name.
#
# @param options [Hash] options to check (e.g. "{ term: 'qt', title: 'Plot title' }")
Check if given options are valid for gnuplot.
Raises ArgumentError if invalid options found.
Now checks only terminal name.
Check if given options are valid for gnuplot . Raises ArgumentError if invalid options found . Now checks only terminal name .
def validate_terminal_options(options)
        terminal = options[:term]
        return unless terminal
        terminal = terminal[0] if terminal.is_a?(Array)
        message = 'Seems like your Gnuplot does not ' \
                  "support that terminal (#{terminal}), please see " \
                  'supported terminals with Settings::available_terminals'
        fail(ArgumentError, message) unless valid_terminal?(terminal)
      end
def validate_terminal_options ( options ) terminal = options [ :term ] return unless terminal terminal = terminal [ 0 ] if terminal . is_a? ( Array ) message = 'Seems like your Gnuplot does not ' "support that terminal (#{terminal}), please see " 'supported terminals with Settings::available_terminals' fail ( ArgumentError , message ) unless valid_terminal? ( terminal ) end
Check if given options are valid for gnuplot.
Check if given options are valid for gnuplot .
options
options to check
options to check