module Attr::Gather::Concerns::Identifiable
Makes an entity identifiable by adding a uuid attribute
@!attribute [r] uuid
@return [String] UUID of the result
Public Class Methods
included(klass)
click to toggle source
# File lib/attr/gather/concerns/identifiable.rb, line 18 def self.included(klass) klass.attr_reader(:uuid) end
new(*)
click to toggle source
Calls superclass method
# File lib/attr/gather/concerns/identifiable.rb, line 13 def initialize(*) @uuid = SecureRandom.uuid super end