Class: Hexx::Entities::UUID
- Inherits:
-
String
- Object
- String
- Hexx::Entities::UUID
- Includes:
- Attestor::Validations
- Defined in:
- lib/hexx-entities/uuid.rb
Overview
Class UUID provides validatable value object that describes UUID
Constant Summary collapse
- FORMAT =
/^\h{8}(-\h{4}){3}-\h{12}$/
Instance Method Summary collapse
-
#initialize(value) ⇒ UUID
constructor
A new instance of UUID.
Constructor Details
#initialize(value) ⇒ UUID
Returns a new instance of UUID.
32 33 34 |
# File 'lib/hexx-entities/uuid.rb', line 32 def initialize(value) super (value || SecureRandom.uuid).to_s end |