Module: ASIR::Identity

Included in:
Message, Result
Defined in:
lib/asir/identity.rb

Overview

!SLIDE Message Identity

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identifierObject

Returns the value of attribute identifier.



8
9
10
# File 'lib/asir/identity.rb', line 8

def identifier
  @identifier
end

#timestampObject

Returns the value of attribute timestamp.



8
9
10
# File 'lib/asir/identity.rb', line 8

def timestamp
  @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 create_timestamp!
  @timestamp ||= ::Time.now.gmtime
end