summaryrefslogtreecommitdiff
path: root/lib/xml/kit/id.rb
blob: c0dd2ebe61e60fa5681de14f3ce79e2ab88fcd9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Xml
  module Kit
    # This class is used primary for generating ID.
    # https://www.w3.org/2001/XMLSchema.xsd
    class Id
      # Generate an ID that conforms to the XML Schema.
      # https://www.w3.org/2001/XMLSchema.xsd
      def self.generate
        "_#{SecureRandom.uuid}"
      end
    end
  end
end