Class: Numo::Gnuplot::FitItem

Inherits:
Object
  • Object
show all
Defined in:
lib/numo/gnuplot.rb

Instance Method Summary collapse

Constructor Details

#initialize(expression, datafile) ⇒ FitItem

:nodoc: all



791
792
793
794
795
# File 'lib/numo/gnuplot.rb', line 791

def initialize(expression,datafile)
  @expression = expression
  @datafile = datafile
  @items = []
end

Instance Method Details

#<<(item) ⇒ Object



797
798
799
# File 'lib/numo/gnuplot.rb', line 797

def <<(item)
  @items << item
end

#cmd_strObject



805
806
807
# File 'lib/numo/gnuplot.rb', line 805

def cmd_str
  "%s %s %s" % [@expression, OptArg.quote(@datafile), OptArg.parse(*@items)]
end

#empty?Boolean

Returns:

  • (Boolean)


801
802
803
# File 'lib/numo/gnuplot.rb', line 801

def empty?
  @items.empty?
end