Class: Ably::Realtime::Channel::ChannelProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/ably/realtime/channel/channel_properties.rb

Overview

Describes the properties of the channel state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel) ⇒ ChannelProperties

Returns a new instance of ChannelProperties.



30
31
32
# File 'lib/ably/realtime/channel/channel_properties.rb', line 30

def initialize(channel)
  @channel = channel
end

Instance Attribute Details

#attach_serialString (readonly)

Starts unset when a channel is instantiated, then updated with the channelSerial from each Ably::Realtime::Channel::STATE.Attached event that matches the channel. Used as the value for Ably::Realtime::Channel#history.

Returns:

  • (String)


19
20
21
# File 'lib/ably/realtime/channel/channel_properties.rb', line 19

def attach_serial
  @attach_serial
end

#channelAbly::Realtime::Channel (readonly)

Ably::Realtime::Channel this object associated with



9
10
11
# File 'lib/ably/realtime/channel/channel_properties.rb', line 9

def channel
  @channel
end

#channel_serialString

ChannelSerial contains the channelSerial from latest ProtocolMessage of action type Message/PresenceMessage received on the channel.

Returns:

  • (String)


28
29
30
# File 'lib/ably/realtime/channel/channel_properties.rb', line 28

def channel_serial
  @channel_serial
end

Instance Method Details

#set_attach_serial(attach_serial) ⇒ Object

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.



35
36
37
# File 'lib/ably/realtime/channel/channel_properties.rb', line 35

def set_attach_serial(attach_serial)
  @attach_serial = attach_serial
end