Class: Ably::Models::ChannelDetails
- Inherits:
-
Object
- Object
- Ably::Models::ChannelDetails
- Extended by:
- Ably::Modules::Enum, Forwardable
- Includes:
- Ably::Modules::ModelCommon
- Defined in:
- lib/ably/models/channel_details.rb
Overview
Contains the details of a Rest::Channel or Realtime::Channel object such as its ID and ChannelStatus.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
(also: #to_h)
readonly
The attributes of ChannelDetails.
Attributes included from Ably::Modules::ModelCommon
Instance Method Summary collapse
-
#channel_id ⇒ String
The identifier of the channel.
-
#initialize(attrs) ⇒ ChannelDetails
constructor
Initialize a new ChannelDetails.
-
#name ⇒ String
The identifier of the channel.
-
#status ⇒ Ably::Models::ChannelStatus?
A ChannelStatus object.
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
35 36 37 |
# File 'lib/ably/models/channel_details.rb', line 35 def initialize(attrs) @attributes = IdiomaticRubyWrapper(attrs.clone) end |
Instance Attribute Details
#attributes ⇒ Object (readonly) Also known as: to_h
The attributes of ChannelDetails
29 30 31 |
# File 'lib/ably/models/channel_details.rb', line 29 def attributes @attributes end |
Instance Method Details
#channel_id ⇒ String
The identifier of the channel
45 46 47 |
# File 'lib/ably/models/channel_details.rb', line 45 def channel_id attributes[:channel_id] end |
#name ⇒ String
The identifier of the channel
55 56 57 |
# File 'lib/ably/models/channel_details.rb', line 55 def name attributes[:name] end |
#status ⇒ Ably::Models::ChannelStatus?
A Ably::Models::ChannelStatus object.
65 66 67 |
# File 'lib/ably/models/channel_details.rb', line 65 def status Ably::Models::ChannelStatus(attributes[:status]) end |