struct Cable::Payload
- Cable::Payload
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
Defined in:
cable/payload.crConstructors
Instance Method Summary
- #action : String
- #action? : Bool
-
#after_initialize
After the Payload is deserialized, parse the data.
- #channel : String
-
#channel_params : Hash(String, RESULT)
These are the additional data sent with the identifier e.g.
- #command : String
- #data : Hash(String, RESULT)
- #identifier : Indentifier
Constructor Detail
Instance Method Detail
def after_initialize
#
After the Payload is deserialized, parse the data. This will ensure we know if it's an action.
These are the additional data sent with the identifier
e.g. {channel: "RoomChannel", room_id: 1}
channel_params["room_id"] # => 1