Method: ActionCableClient::MessageFactory#create

Defined in:
lib/action_cable_client/message_factory.rb

#create(command, action = '', message = nil) ⇒ Object

Parameters:

  • command (String)
    • the type of message that this is

  • action (String) (defaults to: '')
    • the action that is performed to send this message

  • message (Hash) (defaults to: nil)
    • the data to send



26
27
28
29
# File 'lib/action_cable_client/message_factory.rb', line 26

def create(command, action = '', message = nil)
  data = build_data(action, message)
  Message.new(command, identifier, data)
end