lib/submodules/ably-ruby/lib/ably/models/channel_details.rb in ably-rest-1.2.2 vs lib/submodules/ably-ruby/lib/ably/models/channel_details.rb in ably-rest-1.2.3
- old
+ new
@@ -2,54 +2,64 @@
# Convert token details argument to a {ChannelDetails} object
#
# @param attributes (see #initialize)
#
# @return [ChannelDetails]
+ #
def self.ChannelDetails(attributes)
case attributes
when ChannelDetails
return attributes
else
ChannelDetails.new(attributes)
end
end
- # ChannelDetails is a type that represents information for a channel including channelId, name, status and occupancy (CHD1)
+ # Contains the details of a {Ably::Models::Rest::Channel} or {Ably::Models::Realtime::Channel} object
+ # such as its ID and {Ably::Models::ChannelStatus}.
#
class ChannelDetails
extend Ably::Modules::Enum
extend Forwardable
include Ably::Modules::ModelCommon
- # The attributes of ChannelDetails (CHD2)
+ # The attributes of ChannelDetails
#
+ # @spec CHD2
+ #
attr_reader :attributes
alias_method :to_h, :attributes
# Initialize a new ChannelDetails
#
def initialize(attrs)
@attributes = IdiomaticRubyWrapper(attrs.clone)
end
- # The identifier of the channel (CHD2a)
+ # The identifier of the channel
#
+ # @spec CHD2a
+ #
# @return [String]
#
def channel_id
attributes[:channel_id]
end
- # The identifier of the channel (CHD2a)
+ # The identifier of the channel
#
+ # @spec CHD2a
+ #
# @return [String]
#
def name
attributes[:name]
end
- # The status of the channel (CHD2b)
+ # A {Ably::Models::ChannelStatus} object.
+ #
+ # @spec CHD2b
#
# @return [Ably::Models::ChannelStatus, nil]
#
def status
Ably::Models::ChannelStatus(attributes[:status])