Class: EntityCache::Controls::Store::Internal::Example
Instance Attribute Summary
#subject
Instance Method Summary
collapse
build, configure, #get, #put
Instance Method Details
#put?(id, record = nil) ⇒ Boolean
14
15
16
17
18
19
20
|
# File 'lib/entity_cache/controls/store/internal.rb', line 14
def put?(id, record=nil)
if record.nil?
records.key?(id)
else
records[id] == record
end
end
|
#records ⇒ Object
10
11
12
|
# File 'lib/entity_cache/controls/store/internal.rb', line 10
def records
@records ||= {}
end
|