lib/higcm/sender.rb in higcm-0.0.2 vs lib/higcm/sender.rb in higcm-0.0.3
- old
+ new
@@ -18,9 +18,10 @@
@api_key = api_key
raise SenderError.new("api_key is necessary for #{self.class}") if api_key.nil? || api_key.empty?
end
def send(registration_ids, opts={}, handler=nil)
+ handler = HiGCM::Handler.new if handler.nil?
request = send_async(registration_ids, opts, handler)
send_async_run
request.handled_response
end