Class: Rpush::Daemon::Wns::BadgeRequestPayload
- Inherits:
-
Object
- Object
- Rpush::Daemon::Wns::BadgeRequestPayload
- Defined in:
- lib/rpush/daemon/wns/badge_request.rb
Instance Method Summary collapse
-
#initialize(notification) ⇒ BadgeRequestPayload
constructor
A new instance of BadgeRequestPayload.
- #to_xml ⇒ Object
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_xml ⇒ Object
31 32 33 |
# File 'lib/rpush/daemon/wns/badge_request.rb', line 31 def to_xml "<badge value=\"#{@badge}\"/>" end |