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



46
47
48
49
# File 'lib/rpush/client/redis/notification.rb', line 46

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

#app=(app) ⇒ Object



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

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