Method: FluQ::Event#initialize

Defined in:
lib/fluq/event.rb

#initialize(record = {}, timestamp = Time.now) ⇒ Event

Returns a new instance of Event.

Parameters:

  • record (Hash) (defaults to: {})

    the attribute pairs

  • timestamp (Integer) (defaults to: Time.now)

    the UNIX timestamp



8
9
10
11
12
13
# File 'lib/fluq/event.rb', line 8

def initialize(record = {}, timestamp = Time.now)
  @timestamp = timestamp.to_i
  @meta = {}
  super()
  update(record) if Hash === record
end