aki017 / slack-ruby-gem

A Ruby wrapper for the Slack API
MIT License
242 stars 79 forks source link

Store realtime object to instance variable. #57

Open mazgi opened 7 years ago

mazgi commented 7 years ago

This feature enable both following:

https://github.com/aki017/slack-ruby-gem/blob/dev/examples/rtm.rb#L7-L11

rtm = client.realtime
rtm.on :message do |m|
  p m
end
rtm.start

and

client.realtime.on :message do |m|
  p m
end
client.realtime.start
ioquatix commented 6 years ago

How does this work if you want multiple connections?