Class: Slack::RealTime::Concurrency::Eventmachine::Client

Inherits:
Faye::WebSocket::Client
  • Object
show all
Defined in:
lib/slack/real_time/concurrency/eventmachine.rb

Instance Method Summary collapse

Constructor Details

#initialize(url, protocols = nil, options = {}) ⇒ Client

Returns a new instance of Client.



12
13
14
15
# File 'lib/slack/real_time/concurrency/eventmachine.rb', line 12

def initialize(url, protocols = nil, options = {})
  @logger = options.fetch(:logger) || Slack::RealTime::Config.logger || Slack::Config.logger
  super url, protocols, options.except(:logger)
end

Instance Method Details

#parse(data) ⇒ Object



17
18
19
20
# File 'lib/slack/real_time/concurrency/eventmachine.rb', line 17

def parse(data)
  logger.debug("#{self.class}##{__method__}") { data }
  super data
end

#write(data) ⇒ Object



22
23
24
25
# File 'lib/slack/real_time/concurrency/eventmachine.rb', line 22

def write(data)
  logger.debug("#{self.class}##{__method__}") { data }
  super data
end