class GCM::NotificationResponse

Public Class Methods

new(response) click to toggle source
# File lib/gcm/notification_response.rb, line 4
def initialize(response)
  @response = response
end

Public Instance Methods

device_unsubscribed?() click to toggle source
# File lib/gcm/notification_response.rb, line 12
def device_unsubscribed?
  @response.validation_error? &&
  @response.body['errors'] &&
  @response.body['errors']['device'] &&
  @response.body['errors']['device'].include?('unsubscribed')
end
success?() click to toggle source
# File lib/gcm/notification_response.rb, line 8
def success?
  @response.success?
end