Method: Ably::Models::PresenceMessage#protocol_message

Defined in:
lib/submodules/ably-ruby/lib/ably/models/presence_message.rb

#protocol_messageAbly::Models::ProtocolMessage

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The optional ProtocolMessage this presence message is assigned to. If ProtocolMessage is nil, an error will be raised.

Returns:

Raises:

  • (RuntimeError)


208
209
210
211
# File 'lib/submodules/ably-ruby/lib/ably/models/presence_message.rb', line 208

def protocol_message
  raise RuntimeError, 'Presence Message is not yet published with a ProtocolMessage. ProtocolMessage is nil' if @protocol_message.nil?
  @protocol_message
end