class Ably::Rest::Push

Class providing push notification functionality

Attributes

client[R]

@private

Public Class Methods

new(client) click to toggle source
# File lib/submodules/ably-ruby/lib/ably/rest/push.rb, line 12
def initialize(client)
  @client = client
end

Public Instance Methods

activate(*arg) click to toggle source

Activate this device for push notifications by registering with the push transport such as GCM/APNS

@note This is unsupported in the Ruby library

# File lib/submodules/ably-ruby/lib/ably/rest/push.rb, line 27
def activate(*arg)
  raise_unsupported
end
admin() click to toggle source

Admin features for push notifications like managing devices and channel subscriptions

@return [Ably::Rest::Push::Admin]

# File lib/submodules/ably-ruby/lib/ably/rest/push.rb, line 20
def admin
  @admin ||= Admin.new(self)
end
deactivate(*arg) click to toggle source

Deactivate this device for push notifications by removing the registration with the push transport such as GCM/APNS

@note This is unsupported in the Ruby library

# File lib/submodules/ably-ruby/lib/ably/rest/push.rb, line 34
def deactivate(*arg)
  raise_unsupported
end

Private Instance Methods

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