Commit 5e8c9a1

mo <mo.khan@gmail.com>
2017-12-26 21:25:49
move xml id generator to xml-kit.
1 parent 1fa9c2f
Changed files (2)
lib
lib/xml/kit/id.rb
@@ -0,0 +1,13 @@
+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
lib/xml/kit.rb
@@ -2,8 +2,9 @@ require "base64"
 require "logger"
 require "openssl"
 
-require "xml/kit/version"
 require "xml/kit/crypto"
+require "xml/kit/id"
+require "xml/kit/version"
 require "xml/kit/xml_decryption"
 
 module Xml