Class: Flix::IdentityMap
- Inherits:
-
Hash
- Object
- Hash
- Flix::IdentityMap
- Defined in:
- lib/flix/identity_map.rb
Overview
Tracks objects to help ensure that each object gets loaded only once. See: www.martinfowler.com/eaaCatalog/identityMap.html
Instance Method Summary collapse
Instance Method Details
#fetch(id) ⇒ Object
9 10 11 |
# File 'lib/flix/identity_map.rb', line 9 def fetch(id) self[id] end |
#store(id, object) ⇒ Object
16 17 18 |
# File 'lib/flix/identity_map.rb', line 16 def store(id, object) self[id] = object end |