Method: Store#delete

Defined in:
lib/source/redshift/store.rb

#delete(property) ⇒ Object

call-seq:

obj.delete(sym) -> obj

Deletes the property sym, then returns obj.



13
14
15
16
17
18
19
20
21
# File 'lib/source/redshift/store.rb', line 13

def delete(property)
  `var stringId=''+this.__id__`
  storage = `#{Store}.__table__[stringId]`
  storage = `#{Store}.__table__[stringId]=#{{}}` unless storage
  value = storage[property]
  value = nil if `value==null`
  `delete storage.__contents__[property.m$hash()]`
  return value
end