Class: Ably::Rest::Channel::PushChannel

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(channel) ⇒ PushChannel

Returns a new instance of PushChannel.

Raises:

  • (ArgumentError)


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

#channelObject (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

Note:

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

Note:

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

Note:

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_sObject



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

Note:

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

Note:

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