Class: Ably::Realtime::Channel::ChannelProperties
- Inherits:
-
Object
- Object
- Ably::Realtime::Channel::ChannelProperties
- Defined in:
- lib/ably/realtime/channel/channel_properties.rb
Overview
Describes the properties of the channel state.
Instance Attribute Summary collapse
-
#attach_serial ⇒ String
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.
-
#channel ⇒ Ably::Realtime::Channel
readonly
Ably::Realtime::Channel this object associated with.
-
#channel_serial ⇒ String
ChannelSerial contains the channelSerial from latest ProtocolMessage of action type Message/PresenceMessage received on the channel.
Instance Method Summary collapse
-
#initialize(channel) ⇒ ChannelProperties
constructor
A new instance of ChannelProperties.
- #set_attach_serial(attach_serial) ⇒ Object private
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_serial ⇒ String (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.
19 20 21 |
# File 'lib/ably/realtime/channel/channel_properties.rb', line 19 def attach_serial @attach_serial end |
#channel ⇒ Ably::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_serial ⇒ String
ChannelSerial contains the channelSerial from latest ProtocolMessage of action type Message/PresenceMessage received on the channel.
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 |