Class: RubyCqrs::Guid

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_cqrs/guid.rb

Class Method Summary collapse

Class Method Details

.createObject



5
6
7
# File 'lib/ruby_cqrs/guid.rb', line 5

def self.create
  UUIDTools::UUID.timestamp_create.to_s
end

.validate?(guid) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/ruby_cqrs/guid.rb', line 9

def self.validate?(guid)
  UUIDTools::UUID.parse(guid).valid?
end