Module: BackendApiAdapter::ClassMethods

Defined in:
lib/mongo_bureau.rb

Instance Method Summary collapse

Instance Method Details

#backend_get(id) ⇒ Object



12
# File 'lib/mongo_bureau.rb', line 12

def backend_get(id); id=='unique' ? find_one : get(id); end

#backend_post(doc = nil) ⇒ Object



13
# File 'lib/mongo_bureau.rb', line 13

def backend_post(doc=nil); inst = new(doc); inst.is_new = true; inst; end