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

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/rpush/client/active_model/wpns/notification.rb', line 15

def self.included(base)
  base.instance_eval do
    include InstanceMethods

    validates :uri, presence: true
    validates :uri, format: { with: %r{https?://[\S]+} }
    validates :data, presence: true
  end
end