Class: Ably::Rest::Channel::PushChannel
- Inherits:
-
Object
- Object
- Ably::Rest::Channel::PushChannel
- Defined in:
- lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb
Overview
A push channel used for push notifications Each PushChannel maps to exactly one Rest Channel
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
Instance Method Summary collapse
-
#get_subscriptions(*args) ⇒ Object
Get list of subscriptions on this channel for this device or authenticate client_id.
-
#initialize(channel) ⇒ PushChannel
constructor
A new instance of PushChannel.
-
#subscribe_client_id(*args) ⇒ Object
Subscribe all devices registered to this client’s authenticated client_id for push notifications on this channel.
-
#subscribe_device(*args) ⇒ Object
Subscribe local device for push notifications on this channel.
- #to_s ⇒ Object
-
#unsubscribe_client_id(*args) ⇒ Object
Unsubscribe all devices registered to this client’s authenticated client_id for push notifications on this channel.
-
#unsubscribe_device(*args) ⇒ Object
Unsubscribe local device for push notifications on this channel.
Constructor Details
#initialize(channel) ⇒ PushChannel
Returns a new instance of PushChannel.
9 10 11 12 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 9 def initialize(channel) raise ArgumentError, "Unsupported channel type '#{channel.class}'" unless channel.kind_of?(Ably::Rest::Channel) @channel = channel end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
7 8 9 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 7 def channel @channel end |
Instance Method Details
#get_subscriptions(*args) ⇒ Object
This is unsupported in the Ruby library
Get list of subscriptions on this channel for this device or authenticate client_id
49 50 51 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 49 def get_subscriptions(*args) raise_unsupported end |
#subscribe_client_id(*args) ⇒ Object
This is unsupported in the Ruby library
Subscribe all devices registered to this client’s authenticated client_id for push notifications on this channel
28 29 30 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 28 def subscribe_client_id(*args) raise_unsupported end |
#subscribe_device(*args) ⇒ Object
This is unsupported in the Ruby library
Subscribe local device for push notifications on this channel
21 22 23 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 21 def subscribe_device(*args) raise_unsupported end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 14 def to_s "<PushChannel: name=#{channel.name}>" end |
#unsubscribe_client_id(*args) ⇒ Object
This is unsupported in the Ruby library
Unsubscribe all devices registered to this client’s authenticated client_id for push notifications on this channel
42 43 44 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 42 def unsubscribe_client_id(*args) raise_unsupported end |
#unsubscribe_device(*args) ⇒ Object
This is unsupported in the Ruby library
Unsubscribe local device for push notifications on this channel
35 36 37 |
# File 'lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb', line 35 def unsubscribe_device(*args) raise_unsupported end |