Class: DeviceCloud::PushNotification
- Inherits:
-
Object
- Object
- DeviceCloud::PushNotification
- Defined in:
- lib/device_cloud/push_notification.rb
Defined Under Namespace
Classes: AlertNotification, BaseNotification, DataNotification, EventNotification, Message
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
- #handle_each! ⇒ Object
-
#initialize(response_body) ⇒ PushNotification
constructor
A new instance of PushNotification.
Constructor Details
#initialize(response_body) ⇒ PushNotification
Returns a new instance of PushNotification.
5 6 7 |
# File 'lib/device_cloud/push_notification.rb', line 5 def initialize(response_body) @messages = DeviceCloud::PushNotification::Message.(response_body) end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
3 4 5 |
# File 'lib/device_cloud/push_notification.rb', line 3 def @messages end |
Instance Method Details
#handle_each! ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/device_cloud/push_notification.rb', line 9 def handle_each! .each do || next unless .valid? klass = class_type(.topic_type) .no_content? ? klass.handle_no_content!(.parsed_file_data) : klass.handle!(.parsed_file_data) end end |