Module: Rpush::Client::ActiveModel::Wpns::Notification

Included in:
Rpush::Client::ActiveRecord::Wpns::Notification, Redis::Wpns::Notification
Defined in:
lib/rpush/client/active_model/wpns/notification.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



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

def self.included(base)
  base.instance_eval do
    validates :uri, presence: true
    validates :uri, format: { with: %r{https?://[\S]+} }
    validates :alert, presence: true
  end
end