Class: Syncano::Resources::Notifications::Update
- Defined in:
- lib/syncano/resources/notifications/update.rb
Overview
Notification resource about updating data object - represents notification with type “change”
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(client, attributes) ⇒ Update
constructor
Constructor for Syncano::Notifications::Update object.
Methods inherited from Base
all, create, instantize_notification
Methods inherited from Base
#[], #[]=, all, #batch, batch_create, #batch_destroy, #batch_save, #batch_update, count, create, #destroy, #destroyed?, find, #new_record?, #reload!, #save, #saved?, #update
Constructor Details
#initialize(client, attributes) ⇒ Update
Constructor for Syncano::Notifications::Update object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/syncano/resources/notifications/update.rb', line 9 def initialize(client, attributes) super(client, attributes) if attributes.is_a?(::Syncano::Packets::Base) self.attributes = { added: attributes.data[:added], updated: attributes.data[:updated], deleted: attributes.data[:deleted], target: attributes.target } end end |