Class: RubyPushNotifications::WNS::WNSPreConditionError
- Defined in:
- lib/ruby-push-notifications/wns/wns_result.rb
Overview
The device is in a disconnected state.
Constant Summary
Constants inherited from WNSResult
RubyPushNotifications::WNS::WNSResult::X_DEVICE_CONNECTION_STATUS, RubyPushNotifications::WNS::WNSResult::X_NOTIFICATION_STATUS, RubyPushNotifications::WNS::WNSResult::X_STATUS
Instance Attribute Summary collapse
-
#device_connection_status ⇒ String
. The connection status of the device..
-
#notification_status ⇒ String
by the Windows Notification Service.
Attributes inherited from WNSResult
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(device_url, headers) ⇒ WNSPreConditionError
constructor
A new instance of WNSPreConditionError.
Constructor Details
#initialize(device_url, headers) ⇒ WNSPreConditionError
Returns a new instance of WNSPreConditionError.
142 143 144 145 146 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 142 def initialize(device_url, headers) @device_url = device_url @notification_status = headers[X_NOTIFICATION_STATUS] @device_connection_status = headers[X_DEVICE_CONNECTION_STATUS] end |
Instance Attribute Details
#device_connection_status ⇒ String
Returns . The connection status of the device.
140 141 142 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 140 def device_connection_status @device_connection_status end |
#notification_status ⇒ String
by the Windows Notification Service.
137 138 139 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 137 def notification_status @notification_status end |
Instance Method Details
#==(other) ⇒ Object
148 149 150 151 152 153 |
# File 'lib/ruby-push-notifications/wns/wns_result.rb', line 148 def ==(other) (other.is_a?(WNSPreConditionError) && device_url == other.device_url && notification_status == other.notification_status && device_connection_status == other.device_connection_status) || super(other) end |