Sha256: edac1063437ff35911ddc9912c672c68f1f83d44be7b0c24e592dfe81ff4afb7

Contents?: true

Size: 350 Bytes

Versions: 9

Compression:

Stored size: 350 Bytes

Contents

# 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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
xml-kit-0.6.0 lib/xml/kit/id.rb
xml-kit-0.5.0 lib/xml/kit/id.rb
xml-kit-0.4.0 lib/xml/kit/id.rb
xml-kit-0.3.1 lib/xml/kit/id.rb
xml-kit-0.3.0 lib/xml/kit/id.rb
xml-kit-0.2.0 lib/xml/kit/id.rb
xml-kit-0.1.14 lib/xml/kit/id.rb
xml-kit-0.1.13 lib/xml/kit/id.rb
xml-kit-0.1.12 lib/xml/kit/id.rb