class Ably::Models::ChannelOccupancy

Contains the metrics of a {Ably::Models::Rest::Channel} or {Ably::Models::Realtime::Channel} object.

@spec CHO1

Attributes

attributes[R]

The attributes of ChannelOccupancy.

@spec CH02

to_h[R]

The attributes of ChannelOccupancy.

@spec CH02

Public Class Methods

new(attrs) click to toggle source

Initialize a new ChannelOccupancy

# File lib/submodules/ably-ruby/lib/ably/models/channel_occupancy.rb, line 36
def initialize(attrs)
  @attributes = IdiomaticRubyWrapper(attrs.clone)
end

Public Instance Methods

metrics() click to toggle source

A {Ably::Models::ChannelMetrics} object.

@spec CHO2a

@return [Ably::Models::ChannelMetrics, nil]

# File lib/submodules/ably-ruby/lib/ably/models/channel_occupancy.rb, line 46
def metrics
  Ably::Models::ChannelMetrics(attributes[:metrics])
end