class EntityReferences

Public Class Methods

new() click to toggle source
# File lib/store/entity_references.rb, line 2
def initialize
  @hash = Hash.new
end

Public Instance Methods

find(entity) click to toggle source
# File lib/store/entity_references.rb, line 10
def find(entity)
  @hash[entity.object_id]
end
remove(entity) click to toggle source
# File lib/store/entity_references.rb, line 14
def remove(entity)
  @hash.delete entity.object_id
end
save(id, entity) click to toggle source
# File lib/store/entity_references.rb, line 6
def save(id, entity)
  @hash[entity.object_id] = id
end