Class: TreasureData::Logger::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/td/logger/event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEvent

Returns a new instance of Event.



35
36
37
# File 'lib/td/logger/event.rb', line 35

def initialize
  @attribute = {}
end

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute.



39
40
41
# File 'lib/td/logger/event.rb', line 39

def attribute
  @attribute
end

Class Method Details

.use(mod) ⇒ Object



49
50
51
# File 'lib/td/logger/event.rb', line 49

def self.use(mod)
  send(:include, mod)
end

Instance Method Details

#post(action, record = {}) ⇒ Object



41
42
43
# File 'lib/td/logger/event.rb', line 41

def post(action, record={})
  TreasureData::Logger.post(action, @attribute.merge(record))
end

#post_with_time(action, record, time) ⇒ Object



45
46
47
# File 'lib/td/logger/event.rb', line 45

def post_with_time(action, record, time)
  TreasureData::Logger.post_with_time(action, @attribute.merge(record), time)
end