class NumPlot::YesNoOption
The class handling XXX/noXXX options on gnuplot command @!visibility private
Public Class Methods
new(name)
click to toggle source
# File lib/numplot/option.rb, line 66 def initialize(name) @name = name @no_name = "no#{name}".intern end
Also aliased as: []
Public Instance Methods
plot_arg(h)
click to toggle source
# File lib/numplot/option.rb, line 71 def plot_arg(h) return " #{@name}" if h.has_key?(@name) && h[@name] return " #{@name}" if h.has_key?(@no_name) && !h[@no_name] return " #{@no_name}" if h.has_key?(@no_name) && h[@no_name] return " #{@no_name}" if h.has_key?(@name) && !h[@name] "" end