Method: Chatrix::Components::Timeline#process_event

Defined in:
lib/chatrix/components/timeline.rb

#process_event(event) ⇒ Object (private)

Processes a timeline event.

Parameters:

  • event (Hash)

    Event data.



38
39
40
41
42
# File 'lib/chatrix/components/timeline.rb', line 38

def process_event(event)
  return if Events.processed? event
  name = 'handle_' + event['type'].match(/\w+$/).to_s
  send(name, event) if respond_to? name, true
end