Sha256: 81a3d5f24ad896b369f0fd95c8a0a073e11e5e0b036fe0237547574d5b70f4a5

Contents?: true

Size: 606 Bytes

Versions: 12

Compression:

Stored size: 606 Bytes

Contents

module Pione
  module Util
    module UUID
      # Generate random UUID as a string.
      #
      # @return [String]
      #   UUID string
      # @note
      #   we use uuidtools gem for generating UUID
      def generate
        UUIDTools::UUID.random_create.to_s
      end
      module_function :generate

      # Generate random UUID as an iteger.
      #
      # @return [Integer]
      #   UUID integer
      # @note
      #   we use uuidtools gem for generating UUID
      def generate_int
        UUIDTools::UUID.random_create.to_i
      end
      module_function :generate_int
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pione-0.5.0 lib/pione/util/uuid.rb
pione-0.5.0.alpha.2 lib/pione/util/uuid.rb
pione-0.5.0.alpha.1 lib/pione/util/uuid.rb
pione-0.4.2 lib/pione/util/uuid.rb
pione-0.4.1 lib/pione/util/uuid.rb
pione-0.4.0 lib/pione/util/uuid.rb
pione-0.3.2 lib/pione/util/uuid.rb
pione-0.3.1 lib/pione/util/uuid.rb
pione-0.3.0 lib/pione/util/uuid.rb
pione-0.2.2 lib/pione/util/uuid.rb
pione-0.2.1 lib/pione/util/uuid.rb
pione-0.2.0 lib/pione/util/uuid.rb