Module: Pusher::PushNotifications
- Includes:
- Caze
- Defined in:
- lib/pusher/push_notifications.rb,
lib/pusher/push_notifications/token.rb,
lib/pusher/push_notifications/client.rb,
lib/pusher/push_notifications/user_id.rb,
lib/pusher/push_notifications/version.rb,
lib/pusher/push_notifications/use_cases/publish.rb,
lib/pusher/push_notifications/use_cases/delete_user.rb,
lib/pusher/push_notifications/use_cases/generate_token.rb,
lib/pusher/push_notifications/use_cases/publish_to_users.rb
Defined Under Namespace
Modules: UseCases Classes: Client, PushError, Token, UserId
Constant Summary collapse
- VERSION =
'1.3.0'
Class Attribute Summary collapse
-
.instance_id ⇒ Object
Returns the value of attribute instance_id.
-
.secret_key ⇒ Object
Returns the value of attribute secret_key.
Class Method Summary collapse
Class Attribute Details
.instance_id ⇒ Object
Returns the value of attribute instance_id.
27 28 29 |
# File 'lib/pusher/push_notifications.rb', line 27 def instance_id @instance_id end |
.secret_key ⇒ Object
Returns the value of attribute secret_key.
27 28 29 |
# File 'lib/pusher/push_notifications.rb', line 27 def secret_key @secret_key end |
Class Method Details
.configure {|_self| ... } ⇒ Object
29 30 31 32 33 34 |
# File 'lib/pusher/push_notifications.rb', line 29 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 ⇒ Object
58 59 60 61 62 |
# File 'lib/pusher/push_notifications.rb', line 58 def endpoint return @endpoint unless @endpoint.nil? "https://#{@instance_id}.pushnotifications.pusher.com" end |
.endpoint=(endpoint) ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/pusher/push_notifications.rb', line 50 def endpoint=(endpoint) if !endpoint.nil? && endpoint.delete(' ').empty? raise PushError, 'Invalid endpoint override' end @endpoint = endpoint end |