Module: Zulip::Client::EventParser

Included in:
Zulip::Client
Defined in:
lib/zulip/client/event_parser.rb

Class Method Summary collapse

Class Method Details

.parse(event) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/zulip/client/event_parser.rb', line 4

def self.parse(event)
  case event['type']
  when "message"
    Zulip::Message.new event.fetch('message')
  when "heartbeat"
    # NOOP
  end
end