Class: TreasureData::Logger::Event
- Inherits:
-
Object
- Object
- TreasureData::Logger::Event
- Defined in:
- lib/td/logger/event.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #post(action, record = {}) ⇒ Object
- #post_with_time(action, record, time) ⇒ Object
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
35 36 37 |
# File 'lib/td/logger/event.rb', line 35 def initialize @attribute = {} end |
Instance Attribute Details
#attribute ⇒ Object
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 |