Sha256: 0111d5b43987e035dc1ca4cc23de265201aff52f8bdcb58951118098e3a99093

Contents?: true

Size: 529 Bytes

Versions: 14

Compression:

Stored size: 529 Bytes

Contents

module Ddr::Events
  class UpdateEvent < Event
    self.description = "Object updated"

    def self.call(*args)
      super do |event, notification|
        attrs_changed = notification.payload[:attributes_changed]
        ds_changed = notification.payload[:datastreams_changed]
        event.detail = ["Attributes changed: #{attrs_changed}",
                        "Datastreams changed: #{ds_changed.join(', ')}",
                        event.detail,
                       ].compact.join("\n\n")
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ddr-models-2.9.2 lib/ddr/events/update_event.rb
ddr-models-2.9.1 lib/ddr/events/update_event.rb
ddr-models-2.9.0 lib/ddr/events/update_event.rb
ddr-models-2.9.0.rc1 lib/ddr/events/update_event.rb
ddr-models-2.8.0 lib/ddr/events/update_event.rb
ddr-models-2.8.0.rc1 lib/ddr/events/update_event.rb
ddr-models-2.7.6 lib/ddr/events/update_event.rb
ddr-models-2.7.5 lib/ddr/events/update_event.rb
ddr-models-2.7.4 lib/ddr/events/update_event.rb
ddr-models-2.7.3 lib/ddr/events/update_event.rb
ddr-models-2.7.2 lib/ddr/events/update_event.rb
ddr-models-2.7.1 lib/ddr/events/update_event.rb
ddr-models-2.7.0 lib/ddr/events/update_event.rb
ddr-models-2.7.0.rc1 lib/ddr/events/update_event.rb