Sha256: a627101efae3d677e6e04b55c69cfef8648ea999fe17b716d336cf841d0dff89

Contents?: true

Size: 775 Bytes

Versions: 2

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

module RCAP
  module CAP_1_2
    # An Alert object is valid if
    # * it has an identifier
    # * it has a sender
    # * it has a sent time
    # * it has a valid status value
    # * it has a valid messge type value
    # * it has a valid scope value
    # * all Info objects contained in infos are valid
    class Alert < RCAP::Base::Alert
      XMLNS = 'urn:oasis:names:tc:emergency:cap:1.2'
      CAP_VERSION = '1.2'

      STATUS_DRAFT = 'Draft'
      # Valid values for status
      VALID_STATUSES = [STATUS_ACTUAL, STATUS_EXERCISE, STATUS_SYSTEM, STATUS_TEST, STATUS_DRAFT].freeze

      # @return [String]
      def xmlns
        XMLNS
      end

      # @return [Class]
      def info_class
        Info
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rcap-2.7.4 lib/rcap/cap_1_2/alert.rb
rcap-2.7.3 lib/rcap/cap_1_2/alert.rb