Class: JIJI::GraphOut

Inherits:
BaseOut show all
Defined in:
lib/jiji/output.rb

Overview

グラフデータの出力先

Instance Attribute Summary

Attributes inherited from BaseOut

#options, #time

Instance Method Summary collapse

Methods inherited from BaseOut

#each, #save, #set_properties

Constructor Details

#initialize(dir, name, options, scales = []) ⇒ GraphOut

コンストラクタ



206
207
208
209
# File 'lib/jiji/output.rb', line 206

def initialize( dir, name, options, scales=[] ) #:nodoc:
  @scales = scales
  super( dir, name, options )
end

Instance Method Details

#aggregatorsObject

:nodoc:



215
216
217
218
# File 'lib/jiji/output.rb', line 215

def aggregators #:nodoc:
  list = @scales.map{|s| JIJI::Dao::AvgAggregator.new s}
  list << JIJI::Dao::RawAggregator.new
end

#put(*numbers) ⇒ Object

グラフデータを出力します。

numbers

グラフデータ



212
213
214
# File 'lib/jiji/output.rb', line 212

def put( *numbers )
  @dao << JIJI::Dao::BasicTimedData.new( numbers << @time.to_i, @time)
end