module Pusher::PushNotifications

Constants

VERSION

Attributes

instance_id[R]
secret_key[R]

Public Class Methods

configure() { |self| ... } click to toggle source
# File lib/pusher/push_notifications.rb, line 26
def configure
  yield(self)
  # returning a duplicate of `self` to allow multiple clients to be
  # configured without needing to reconfigure the singleton instance
  dup
end
endpoint() click to toggle source
# File lib/pusher/push_notifications.rb, line 51
def endpoint
  return @endpoint unless @endpoint.nil?

  "https://#{@instance_id}.pushnotifications.pusher.com"
end
endpoint=(endpoint) click to toggle source
# File lib/pusher/push_notifications.rb, line 45
def endpoint=(endpoint)
  raise PushError, 'Invalid endpoint override' if !endpoint.nil? && endpoint.delete(' ').empty?

  @endpoint = endpoint
end
instance_id=(instance_id) click to toggle source
# File lib/pusher/push_notifications.rb, line 33
def instance_id=(instance_id)
  raise PushError, 'Invalid instance id' if instance_id.nil? || instance_id.delete(' ').empty?

  @instance_id = instance_id
end
secret_key=(secret_key) click to toggle source
# File lib/pusher/push_notifications.rb, line 39
def secret_key=(secret_key)
  raise PushError, 'Invalid secret key' if secret_key.nil? || secret_key.delete(' ').empty?

  @secret_key = secret_key
end