Class: Rpush::Daemon::Wns::BadgeRequestPayload

Inherits:
Object
  • Object
show all
Defined in:
lib/rpush/daemon/wns/badge_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(notification) ⇒ BadgeRequestPayload

Returns a new instance of BadgeRequestPayload.



27
28
29
# File 'lib/rpush/daemon/wns/badge_request.rb', line 27

def initialize(notification)
  @badge = notification.badge || 0
end

Instance Method Details

#to_xmlObject



31
32
33
# File 'lib/rpush/daemon/wns/badge_request.rb', line 31

def to_xml
  "<badge value=\"#{@badge}\"/>"
end