Module: Rpush::Client::ActiveModel::Wns::Notification

Included in:
Rpush::Client::ActiveRecord::Wns::Notification, Mongoid::Wns::Notification, Redis::Wns::Notification
Defined in:
lib/rpush/client/active_model/wns/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/wns/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