Class: MotionPlot::BaseDelegate

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-plot/chart/delegates/base_delegate.rb

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ BaseDelegate

Returns a new instance of BaseDelegate.



4
5
6
# File 'lib/motion-plot/chart/delegates/base_delegate.rb', line 4

def initialize(source)
  @delegated_to = source
end

Instance Method Details

#numberOfRecordsForPlot(plot) ⇒ Object



8
9
10
# File 'lib/motion-plot/chart/delegates/base_delegate.rb', line 8

def numberOfRecordsForPlot(plot)
  @delegated_to.series[plot.identifier].data.size
end