module Hypostasis::Document::Persistence
Public Instance Methods
destroy()
click to toggle source
# File lib/hypostasis/document/persistence.rb, line 14 def destroy self.class.namespace.transact do |tr| tr.clear_range_start_with(self.class.namespace.for_document(self)) end end
save()
click to toggle source
# File lib/hypostasis/document/persistence.rb, line 5 def save generate_id self.class.namespace.transact do |tr| tr.set(self.class.namespace.for_document(self), @fields.to_bson) indexed_fields_to_commit.each {|key| tr.set(key, 'true') } end self end