Module: ASIR::Identity
Overview
!SLIDE Message Identity
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#create_identifier! ⇒ Object
Creates a thread-safe unique identifier.
-
#create_timestamp! ⇒ Object
Creates a timestamp.
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
8 9 10 |
# File 'lib/asir/identity.rb', line 8 def identifier @identifier end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
8 9 10 |
# File 'lib/asir/identity.rb', line 8 def @timestamp end |
Instance Method Details
#create_identifier! ⇒ Object
Creates a thread-safe unique identifier.
11 12 13 |
# File 'lib/asir/identity.rb', line 11 def create_identifier! @identifier ||= ::ASIR::UUID.counter_uuid end |
#create_timestamp! ⇒ Object
Creates a timestamp.
16 17 18 |
# File 'lib/asir/identity.rb', line 16 def @timestamp ||= ::Time.now.gmtime end |