Class: Garufa::API::EventHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/garufa/api/event_handler.rb

Instance Method Summary collapse

Instance Method Details

#handle(body) ⇒ Object



10
11
12
# File 'lib/garufa/api/event_handler.rb', line 10

def handle(body)
  notify JSON.parse(body)
end

#handle_legacy(body, channel, params) ⇒ Object



14
15
16
# File 'lib/garufa/api/event_handler.rb', line 14

def handle_legacy(body, channel, params)
  notify params.merge(channels: [channel], data: JSON.parse(body))
end