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



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

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

#aggregatedObject



330
331
332
# File 'lib/jiji/dao/timed_data_dao.rb', line 330

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