lib/pusher-fake/connection.rb
# Name matcher for client events.
Name matcher for client events.
Name matcher for client events .
def trigger(channel, id, event, data)
      Thread.new do
        hook = {
          event:     event,
          channel:   channel.name,
          socket_id: id
        }
        hook[:data]    = MultiJson.dump(data) if data
        hook[:user_id] = channel.members[self][:user_id] if channel.is_a?(Channel::Presence)
        channel.trigger("client_event", hook)
      end
    end
def trigger ( channel , id , event , data ) Thread . new do hook = { event : event , channel : channel . name , socket_id : id } hook [ :data ] = MultiJson . dump ( data ) if data hook [ :user_id ] = channel . members [ self ] [ :user_id ] if channel . is_a? ( Channel :: Presence ) channel . trigger ( "client_event" , hook ) end end
Name matcher for client events.
Name matcher for client events .
channel
<not_specific>
id
<not_specific>
event
<not_specific>
data
<not_specific>