Class: QRPC::Generator::UUID

Inherits:
Object
  • Object
show all
Defined in:
lib/qrpc/generator/uuid.rb

Overview

UUID generator.

Since:

  • 0.9.0

Instance Method Summary collapse

Instance Method Details

#generate(object = nil) ⇒ String Also known as: generate!

Generates UUID as ID for given object.

Parameters:

  • object (Object) (defaults to: nil)

    required object

Returns:

  • (String)

    new ID

Since:

  • 0.9.0



33
34
35
# File 'lib/qrpc/generator/uuid.rb', line 33

def generate(object = nil)
    ::UUID.generate(:compact).to_sym
end