Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (17 sloc) 0.393 kb
module Twitter
# Tracks objects to help ensure that each object gets loaded only once.
# See: http://www.martinfowler.com/eaaCatalog/identityMap.html
class IdentityMap < Hash
# @param id
# @return [Object]
def fetch(id)
self[id]
end
# @param id
# @param object
# @return [Object]
def store(id, object)
self[id] = object
end
end
end
Jump to Line
Something went wrong with that request. Please try again.