Sha256: b454c625b03ffe3485d9f04e3a5e2a1fc051ad5d0e09d180639fc87b09908aa3

Contents?: true

Size: 448 Bytes

Versions: 1

Compression:

Stored size: 448 Bytes

Contents

module Notifications
  class Client
    class TemplatePreview
      FIELDS = [
        :id,
        :version,
        :body,
        :subject,
        :type
      ].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

1 entries across 1 versions & 1 rubygems

Version Path
notifications-ruby-client-2.1.0 lib/notifications/client/template_preview.rb