Class: JIJI::Dao::LastAggregator

Inherits:
AbstractAggregator show all
Defined in:
lib/jiji/dao/timed_data_dao.rb

Overview

最後の値を返すAggregator

Instance Attribute Summary

Attributes inherited from AbstractAggregator

#start

Attributes inherited from Aggregator

#scale

Instance Method Summary collapse

Methods inherited from AbstractAggregator

#flush, #initialize, #next, #next_date

Methods inherited from Aggregator

#flush, #initialize, #next

Constructor Details

This class inherits a constructor from JIJI::Dao::AbstractAggregator

Instance Method Details

#aggregate(timed_data) ⇒ Object



325
326
327
# File 'lib/jiji/dao/timed_data_dao.rb', line 325

def aggregate( timed_data )
  @values = timed_data.values
end

#aggregatedObject



328
329
330
# File 'lib/jiji/dao/timed_data_dao.rb', line 328

def aggregated
  BasicTimedData.new( @values + [@start.to_i, @end.to_i], @end)
end