Module: Rpush::Client::ActiveModel::Apns::App

Included in:
Rpush::Client::ActiveRecord::Apns::App, Mongoid::Apns::App, Redis::Apns::App
Defined in:
lib/rpush/client/active_model/apns/app.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


6
7
8
9
10
11
12
# File 'lib/rpush/client/active_model/apns/app.rb', line 6

def self.included(base)
  base.instance_eval do
    validates :environment, presence: true, inclusion: { in: %w(development production sandbox) }
    validates :certificate, presence: true
    validate :certificate_has_matching_private_key
  end
end

Instance Method Details

#service_nameObject


14
15
16
# File 'lib/rpush/client/active_model/apns/app.rb', line 14

def service_name
  'apns'
end