Class: Ably::Models::ChannelDetails

Inherits:
Object
  • Object
show all
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 included from Ably::Modules::ModelCommon

#hash

Instance Method Summary collapse

Methods included from Ably::Modules::ModelCommon

#==, #[], #as_json, included, #to_json, #to_s

Methods included from Ably::Modules::MessagePack

#to_msgpack

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

#attributesObject (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_idString

The identifier of the channel (CHD2a)

Returns:

  • (String)


39
40
41
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 39

def channel_id
  attributes[:channel_id]
end

#nameString

The identifier of the channel (CHD2a)

Returns:

  • (String)


47
48
49
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 47

def name
  attributes[:name]
end

#statusAbly::Models::ChannelStatus?

The status of the channel (CHD2b)

Returns:



55
56
57
# File 'lib/submodules/ably-ruby/lib/ably/models/channel_details.rb', line 55

def status
  Ably::Models::ChannelStatus(attributes[:status])
end