Class: Ably::Models::ChannelDetails
- Inherits:
-
Object
- Object
- Ably::Models::ChannelDetails
- Extended by:
- Ably::Modules::Enum, Forwardable
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/submodules/ably-ruby/lib/ably/models/channel_details.rb
Overview
ChannelDetails is a type that represents information for a channel including channelId, name, status and occupancy (CHD1)
Instance Attribute Summary collapse
-
#attributes ⇒ Object
(also: #to_h)
readonly
The attributes of ChannelDetails (CHD2).
Attributes included from Ably::Modules::ModelCommon
Instance Method Summary collapse
-
#channel_id ⇒ String
The identifier of the channel (CHD2a).
-
#initialize(attrs) ⇒ ChannelDetails
constructor
Initialize a new ChannelDetails.
-
#name ⇒ String
The identifier of the channel (CHD2a).
-
#status ⇒ Ably::Models::ChannelStatus?
The status of the channel (CHD2b).
Methods included from Ably::Modules::ModelCommon
#==, #[], #as_json, included, #to_json, #to_s
Methods included from Ably::Modules::MessagePack
Constructor Details
#initialize(attrs) ⇒ ChannelDetails
Initialize a new ChannelDetails
31 32 33 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 31 def initialize(attrs) @attributes = IdiomaticRubyWrapper(attrs.clone) end |
Instance Attribute Details
#attributes ⇒ Object (readonly) Also known as: to_h
The attributes of ChannelDetails (CHD2)
25 26 27 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 25 def attributes @attributes end |
Instance Method Details
#channel_id ⇒ String
The identifier of the channel (CHD2a)
39 40 41 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 39 def channel_id attributes[:channel_id] end |
#name ⇒ String
The identifier of the channel (CHD2a)
47 48 49 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 47 def name attributes[:name] end |
#status ⇒ Ably::Models::ChannelStatus?
The status of the channel (CHD2b)
55 56 57 |
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 55 def status Ably::Models::ChannelStatus(attributes[:status]) end |