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(*args) {|options| ... } ⇒ Ably::Rest::Channel
Return a Channel for the given name if it exists, else the block will be called.
-
#get(*args) ⇒ 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(*args) {|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
31 32 33 |
# File 'lib/ably/rest/channels.rb', line 31 def fetch(*args) super end |
#get(*args) ⇒ Ably::Rest::Channel
Return a Ably::Rest::Channel for the given name
18 19 20 |
# File 'lib/ably/rest/channels.rb', line 18 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
42 43 44 |
# File 'lib/ably/rest/channels.rb', line 42 def release(*args) super end |