Class: Humanoid::Identity

Inherits:
Object show all
Defined in:
lib/humanoid/identity.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.create(doc) ⇒ Object

Create the identity for the Document.

The id will be set in either in the form of a Mongo ObjectID or a composite key set up by defining a key on the document.

The _type will be set to the document’s class name.



11
12
13
# File 'lib/humanoid/identity.rb', line 11

def create(doc)
  identify(doc); type(doc); doc
end