Class: Primer::RealTime::ServerAuth
- Inherits:
-
Object
- Object
- Primer::RealTime::ServerAuth
- Defined in:
- lib/primer/real_time.rb
Instance Method Summary collapse
Instance Method Details
#incoming(message, callback) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/primer/real_time.rb', line 10 def incoming(, callback) channel = ['channel'] return callback.call() if Faye::Channel.(channel) password = ['ext'] && ['ext']['password'] unless password == RealTime.password ['error'] = Faye::Error.ext_mismatch end ['ext'].delete('password') if password callback.call() end |