Class: Ably::Models::ChannelMetrics
- Inherits:
-
Object
- Object
- Ably::Models::ChannelMetrics
- Extended by:
- Ably::Modules::Enum, Forwardable
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb
Overview
ChannelMetrics is a type that contains the count of publishers and subscribers, connections and presenceConnections, presenceMembers and presenceSubscribers (CHM1)
Instance Attribute Summary collapse
-
#attributes ⇒ Object
(also: #to_h)
readonly
The attributes of ChannelMetrics (CHM2).
Attributes included from Ably::Modules::ModelCommon
Instance Method Summary collapse
-
#connections ⇒ Integer
The total number of connections to the channel (CHM2a).
-
#initialize(attrs) ⇒ ChannelMetrics
constructor
Initialize a new ChannelMetrics.
-
#presence_connections ⇒ Integer
The total number of presence connections to the channel (CHM2b).
-
#presence_members ⇒ Integer
The total number of presence members for the channel (CHM2c).
-
#presence_subscribers ⇒ Integer
The total number of presence subscribers for the channel (CHM2d).
-
#publishers ⇒ Integer
The total number of publishers to the channel (CHM2e).
-
#subscribers ⇒ Integer
The total number of subscribers to the channel (CHM2f).
Methods included from Ably::Modules::ModelCommon
#==, #[], #as_json, included, #to_json, #to_s
Methods included from Ably::Modules::MessagePack
Constructor Details
#initialize(attrs) ⇒ ChannelMetrics
Initialize a new ChannelMetrics
32 33 34 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 32 def initialize(attrs) @attributes = IdiomaticRubyWrapper(attrs.clone) end |
Instance Attribute Details
#attributes ⇒ Object (readonly) Also known as: to_h
The attributes of ChannelMetrics (CHM2)
26 27 28 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 26 def attributes @attributes end |
Instance Method Details
#connections ⇒ Integer
The total number of connections to the channel (CHM2a)
40 41 42 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 40 def connections attributes[:connections] end |
#presence_connections ⇒ Integer
The total number of presence connections to the channel (CHM2b)
48 49 50 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 48 def presence_connections attributes[:presence_connections] end |
#presence_members ⇒ Integer
The total number of presence members for the channel (CHM2c)
56 57 58 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 56 def presence_members attributes[:presence_members] end |
#presence_subscribers ⇒ Integer
The total number of presence subscribers for the channel (CHM2d)
64 65 66 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 64 def presence_subscribers attributes[:presence_subscribers] end |
#publishers ⇒ Integer
The total number of publishers to the channel (CHM2e)
72 73 74 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 72 def publishers attributes[:publishers] end |
#subscribers ⇒ Integer
The total number of subscribers to the channel (CHM2f)
80 81 82 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_metrics.rb', line 80 def subscribers attributes[:subscribers] end |