Sha256: 7922a900c1e4b676f0710600fdcd368cd0429aedb5d09e887ac58d9030a0b42b

Contents?: true

Size: 381 Bytes

Versions: 21

Compression:

Stored size: 381 Bytes

Contents

module Notifications
  class Client
    class ResponseNotification
      FIELDS = %i(
      id
      reference
      content
      template
      uri
    ).freeze

      attr_reader(*FIELDS)

      def initialize(notification)
        FIELDS.each do |field|
          instance_variable_set(:"@#{field}", notification.fetch(field.to_s, nil))
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
notifications-ruby-client-6.2.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-6.0.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-5.4.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-5.3.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-5.2.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-5.1.2 lib/notifications/client/response_notification.rb
notifications-ruby-client-5.1.1 lib/notifications/client/response_notification.rb
notifications-ruby-client-5.1.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-4.0.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-3.1.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-3.0.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.10.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.9.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.8.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.7.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.6.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.5.1 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.5.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.4.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.3.0 lib/notifications/client/response_notification.rb