Class: SimpleEventSourcing::Id::UUIDId
- Defined in:
- lib/simple_event_sourcing/aggregate_root/id.rb
Instance Attribute Summary
Attributes inherited from BaseId
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ UUIDId
constructor
A new instance of UUIDId.
Methods inherited from BaseId
Constructor Details
#initialize(value) ⇒ UUIDId
Returns a new instance of UUIDId.
27 28 29 30 |
# File 'lib/simple_event_sourcing/aggregate_root/id.rb', line 27 def initialize(value) raise UUIDValidationError unless valid? value super(value) end |
Class Method Details
.generate ⇒ Object
32 33 34 |
# File 'lib/simple_event_sourcing/aggregate_root/id.rb', line 32 def self.generate new SecureRandom.uuid end |