Sha256: fd482d7ddc02b8640bed84c834441baf47e23ec44afc0433b86500f36f957ac0

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

module Govspeak
  class EmbeddedContent
    SUPPORTED_DOCUMENT_TYPES = %w[contact content_block_email_address].freeze
    UUID_REGEX = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/
    EMBED_REGEX = /({{embed:(#{SUPPORTED_DOCUMENT_TYPES.join('|')}):#{UUID_REGEX}}})/

    attr_reader :document_type, :content_id, :embed_code

    def initialize(document_type:, content_id:, embed_code:)
      @document_type = document_type
      @content_id = content_id
      @embed_code = embed_code
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
govspeak-8.5.0 lib/govspeak/embedded_content.rb