Class DataMapper::SubjectSet::NameCache
In: lib/dm-core/support/subject_set.rb
Parent: Object

An {OrderedSet::Cache::API} implementation that establishes set semantics based on the name of its entries. The cache uses the entries’ names as cache key and refuses to add entries that don‘t respond_to?(:name).

@see OrderedSet::Cache::API

@api private

Methods

key_for   valid?  

Included Modules

OrderedSet::Cache::API

Public Instance methods

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

@param [name] entry

  the entry to get the key for

@return [to_s, nil]

  the entry's name or nil if the entry isn't #valid?

@api private

Tests if the given entry qualifies to be added to the cache

@param [name] entry

  the entry to be checked

@return [Boolean]

  true if the entry respond_to?(:name)

@api private

[Validate]