Class: Ably::Models::ChannelOccupancy
- Inherits:
-
Object
- Object
- Ably::Models::ChannelOccupancy
- Extended by:
- Ably::Modules::Enum, Forwardable
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/submodules/ably-ruby/lib/ably/models/channel_occupancy.rb
Overview
Contains the metrics of a Rest::Channel or Realtime::Channel object.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
(also: #to_h)
readonly
The attributes of ChannelOccupancy.
Attributes included from Ably::Modules::ModelCommon
Instance Method Summary collapse
-
#initialize(attrs) ⇒ ChannelOccupancy
constructor
Initialize a new ChannelOccupancy.
-
#metrics ⇒ Ably::Models::ChannelMetrics?
A ChannelMetrics object.
Methods included from Ably::Modules::ModelCommon
#==, #[], #as_json, included, #to_json, #to_s
Methods included from Ably::Modules::MessagePack
Constructor Details
#initialize(attrs) ⇒ ChannelOccupancy
Initialize a new ChannelOccupancy
36 37 38 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_occupancy.rb', line 36 def initialize(attrs) @attributes = IdiomaticRubyWrapper(attrs.clone) end |
Instance Attribute Details
#attributes ⇒ Object (readonly) Also known as: to_h
The attributes of ChannelOccupancy.
30 31 32 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_occupancy.rb', line 30 def attributes @attributes end |
Instance Method Details
#metrics ⇒ Ably::Models::ChannelMetrics?
A Ably::Models::ChannelMetrics object.
46 47 48 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_occupancy.rb', line 46 def metrics Ably::Models::ChannelMetrics(attributes[:metrics]) end |