Class: DataMapper::OrderedSet::Cache Private
- Inherits:
-
Object
- Object
- DataMapper::OrderedSet::Cache
- Includes:
- API
- Defined in:
- lib/dm-core/support/ordered_set.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The default cache used by DataMapper::OrderedSet
Uses a Hash as internal storage and enforces set semantics by calling #eql? and #hash on the set’s entries.
Defined Under Namespace
Modules: API
Instance Method Summary collapse
-
#key_for(entry) ⇒ Object
private
Given an entry, return the key to be used in the cache.
-
#valid?(entry) ⇒ true
private
Tests if the given entry qualifies to be added to the cache.
Methods included from API
#[], #[]=, #clear, #delete, #include?, #initialize
Instance Method Details
#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
188 189 190 |
# File 'lib/dm-core/support/ordered_set.rb', line 188 def key_for(entry) entry end |
#valid?(entry) ⇒ true
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.
Tests if the given entry qualifies to be added to the cache
175 176 177 |
# File 'lib/dm-core/support/ordered_set.rb', line 175 def valid?(entry) true end |