Module: HashIdentable

Defined in:
lib/hash_identable.rb,
lib/hash_identable/locator.rb,
lib/hash_identable/version.rb,
lib/hash_identable/identity.rb,
lib/hash_identable/exceptions.rb,
lib/hash_identable/hsh_function.rb,
lib/hash_identable/lookup_table.rb,
lib/hash_identable/class_methods.rb,
lib/hash_identable/configuration.rb

Defined Under Namespace

Modules: ClassMethods, HshFunction, Locator Classes: Configuration, Identity, LookupTable, NoObjectRegistered

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.config {|configuration| ... } ⇒ Object

Yields:



3
4
5
# File 'lib/hash_identable/configuration.rb', line 3

def self.config
  yield(configuration)
end

.configurationObject



7
8
9
# File 'lib/hash_identable/configuration.rb', line 7

def self.configuration
  @configuration ||= Configuration.new
end

.included(base) ⇒ Object



3
4
5
# File 'lib/hash_identable/class_methods.rb', line 3

def self.included(base)
  base.extend(ClassMethods)
end

.lookup_tableObject



5
6
7
# File 'lib/hash_identable/lookup_table.rb', line 5

def self.lookup_table
  @lookup_table ||= LookupTable.new
end

Instance Method Details

#identityObject



11
12
13
# File 'lib/hash_identable.rb', line 11

def identity
  @identity ||= Identity.new(self.class, id)
end

#uuidObject



15
16
17
# File 'lib/hash_identable.rb', line 15

def uuid
  identity.encoded_id
end