Class: Ably::Realtime::Push

Inherits:
Object
  • Object
show all
Defined in:
lib/ably/realtime/push.rb,
lib/ably/realtime/push/admin.rb,
lib/ably/realtime/push/device_registrations.rb,
lib/ably/realtime/push/channel_subscriptions.rb

Overview

Class providing push notification functionality

Defined Under Namespace

Classes: Admin, ChannelSubscriptions, DeviceRegistrations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Push

Returns a new instance of Push


10
11
12
# File 'lib/ably/realtime/push.rb', line 10

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)


8
9
10
# File 'lib/ably/realtime/push.rb', line 8

def client
  @client
end

Instance Method Details

#activate(*arg) ⇒ Object

Note:

This is unsupported in the Ruby library

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


23
24
25
# File 'lib/ably/realtime/push.rb', line 23

def activate(*arg)
  raise_unsupported
end

#adminAbly::Realtime::Push::Admin

Admin features for push notifications like managing devices and channel subscriptions


16
17
18
# File 'lib/ably/realtime/push.rb', line 16

def admin
  @admin ||= Admin.new(self)
end

#deactivate(*arg) ⇒ Object

Note:

This is unsupported in the Ruby library

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


30
31
32
# File 'lib/ably/realtime/push.rb', line 30

def deactivate(*arg)
  raise_unsupported
end