class Ably::Rest::Channel::PushChannel

A push channel used for push notifications Each PushChannel maps to exactly one Rest Channel

Attributes

channel[R]

Public Class Methods

new(channel) click to toggle source
# 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

Public Instance Methods

get_subscriptions(*args) click to toggle source

Get list of subscriptions on this channel for this device or authenticate client_id

@note This is unsupported in the Ruby library

# 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) click to toggle source

Subscribe all devices registered to this client’s authenticated client_id for push notifications on this channel

@note This is unsupported in the Ruby library

# 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) click to toggle source

Subscribe local device for push notifications on this channel

@note This is unsupported in the Ruby library

# File lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb, line 21
def subscribe_device(*args)
  raise_unsupported
end
to_s() click to toggle source
# 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) click to toggle source

Unsubscribe all devices registered to this client’s authenticated client_id for push notifications on this channel

@note This is unsupported in the Ruby library

# 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) click to toggle source

Unsubscribe local device for push notifications on this channel

@note This is unsupported in the Ruby library

# File lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb, line 35
def unsubscribe_device(*args)
  raise_unsupported
end

Private Instance Methods

raise_unsupported() click to toggle source
# File lib/submodules/ably-ruby/lib/ably/rest/channel/push_channel.rb, line 54
def raise_unsupported
  raise Ably::Exceptions::PushNotificationsNotSupported, 'This device does not support receiving or subscribing to push notifications. All PushChannel methods are unavailable'
end