Method: DataMapper::OrderedSet::Cache::API#key_for

Defined in:
lib/dm-core/support/ordered_set.rb

#key_for(entry) ⇒ Object?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Given an entry, return the key to be used in the cache

Parameters:

  • entry (Object)

    the entry to get the key for

Returns:

  • (Object, nil)

    a value derived from the entry that is used as key in the cache

Raises:

  • (NotImplementedError)


86
87
88
# File 'lib/dm-core/support/ordered_set.rb', line 86

def key_for(entry)
  raise NotImplementedError, "#{self}#key_for must be implemented"
end