Class: Ably::Rest::Channels
- Inherits:
-
Object
- Object
- Ably::Rest::Channels
- Includes:
- Modules::ChannelsCollection
- Defined in:
- lib/ably/rest/channels.rb
Instance Attribute Summary
Attributes included from Modules::ChannelsCollection
Instance Method Summary collapse
-
#fetch(name) {|options| ... } ⇒ Ably::Rest::Channel
Return a Channel for the given name if it exists, else the block will be called.
-
#get(name, channel_options = {}) ⇒ Ably::Rest::Channel
Return a Channel for the given name.
- #initialize(client) ⇒ Ably::Rest::Channels constructor
-
#release(*args) ⇒ void
Destroy the Channel and releases the associated resources.
Methods included from Modules::ChannelsCollection
Constructor Details
#initialize(client) ⇒ Ably::Rest::Channels
7 8 9 |
# File 'lib/ably/rest/channels.rb', line 7 def initialize(client) super client, Ably::Rest::Channel end |
Instance Method Details
#fetch(name) {|options| ... } ⇒ Ably::Rest::Channel
Return a Ably::Rest::Channel for the given name if it exists, else the block will be called. This method is intentionally similar to Hash#fetch providing a simple way to check if a channel exists or not without creating one
29 30 31 |
# File 'lib/ably/rest/channels.rb', line 29 def fetch(*args) super end |
#get(name, channel_options = {}) ⇒ Ably::Rest::Channel
Return a Ably::Rest::Channel for the given name
17 18 19 |
# File 'lib/ably/rest/channels.rb', line 17 def get(*args) super end |
#release(*args) ⇒ void
This method returns an undefined value.
Destroy the Ably::Rest::Channel and releases the associated resources.
Releasing a Ably::Rest::Channel is not typically necessary as a channel consumes no resources other than the memory footprint of the Ably::Rest::Channel object. Explicitly release channels to free up resources if required
39 40 41 |
# File 'lib/ably/rest/channels.rb', line 39 def release(*args) super end |