Class: Rpush::Client::Redis::Notification

Inherits:
Object
  • Object
show all
Includes:
Modis::Model, ActiveModel::Notification, MultiJsonHelper
Defined in:
lib/rpush/client/redis/notification.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ActiveModel::Notification

included, #payload, #payload_data_size

Methods included from MultiJsonHelper

#multi_json_dump, #multi_json_load

Class Method Details

.absolute_pending_namespaceObject



13
14
15
# File 'lib/rpush/client/redis/notification.rb', line 13

def self.absolute_pending_namespace
  "#{absolute_namespace}:pending"
end

.absolute_retryable_namespaceObject



17
18
19
# File 'lib/rpush/client/redis/notification.rb', line 17

def self.absolute_retryable_namespace
  "#{absolute_namespace}:retryable"
end

Instance Method Details

#appObject



52
53
54
55
# File 'lib/rpush/client/redis/notification.rb', line 52

def app
  return nil unless app_id
  @app ||= Rpush::Client::Redis::App.find(app_id)
end

#app=(app) ⇒ Object



57
58
59
60
61
62
63
64
# File 'lib/rpush/client/redis/notification.rb', line 57

def app=(app)
  @app = app
  if app
    self.app_id = app.id
  else
    self.app_id = nil
  end
end