Sha256: c0361e7d81be2a0d33968a7380ce08edbdc05c2738c91171478936d3be3e521f

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

module Notifications
  class Client
    class ResponseNotification
      FIELDS = [
      :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

2 entries across 2 versions & 1 rubygems

Version Path
notifications-ruby-client-2.1.0 lib/notifications/client/response_notification.rb
notifications-ruby-client-2.0.0 lib/notifications/client/response_notification.rb