class Xinge::Notification
Attributes
android[R]
ios[R]
Public Class Methods
new()
click to toggle source
# File lib/xinge/notification.rb, line 11 def initialize @android = Xinge::Android.new(Xinge.config[:android_accessId], Xinge.config[:android_secretKey]) @ios = Xinge::Ios.new(Xinge.config[:ios_accessId], Xinge.config[:ios_secretKey]) end
Public Instance Methods
send_simple_to_all(title, content)
click to toggle source
发送简单消息到所有 android , ios 设备
# File lib/xinge/notification.rb, line 16 def send_simple_to_all(title, content) result = [] [@android, @ios].each do |sender| result << sender.pushToAllDevice(title,content) end result end