Sha256: 0eefd9da5a897f52680ae0ec9291944de872cccf7f4eb721865f969e966e72b5
Contents?: true
Size: 936 Bytes
Versions: 22
Compression:
Stored size: 936 Bytes
Contents
module Rpush module Client module ActiveModel module Gcm module Notification def self.included(base) base.instance_eval do validates :registration_ids, presence: true validates_with Rpush::Client::ActiveModel::PayloadDataSizeValidator, limit: 4096 validates_with Rpush::Client::ActiveModel::RegistrationIdsCountValidator, limit: 1000 validates_with Rpush::Client::ActiveModel::Gcm::ExpiryCollapseKeyMutualInclusionValidator end end def as_json json = { 'registration_ids' => registration_ids, 'delay_while_idle' => delay_while_idle, 'data' => data } json['collapse_key'] = collapse_key if collapse_key json['time_to_live'] = expiry if expiry json end end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems