Class: GOM::Storage::CouchDB::Draft::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/gom/storage/couchdb/draft/builder.rb

Overview

Builds a draft out of a CouchDB document.

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ Builder

Returns a new instance of Builder.



5
6
7
# File 'lib/gom/storage/couchdb/draft/builder.rb', line 5

def initialize(document)
  @document = document
end

Instance Method Details

#draftObject



9
10
11
12
13
14
15
# File 'lib/gom/storage/couchdb/draft/builder.rb', line 9

def draft
  initialize_draft
  set_object_id
  set_class
  set_properties_and_relations
  @draft
end