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

Returns a new instance of FitItem.


778
779
780
781
782
# File 'lib/numo/gnuplot.rb', line 778

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

Instance Method Details

#<<(item) ⇒ Object


784
785
786
# File 'lib/numo/gnuplot.rb', line 784

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

#cmd_strObject


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

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

#empty?Boolean

Returns:

  • (Boolean)

788
789
790
# File 'lib/numo/gnuplot.rb', line 788

def empty?
  @items.empty?
end