Class: GOM::Storage::CouchDB::Saver
- Inherits:
-
Object
- Object
- GOM::Storage::CouchDB::Saver
- Defined in:
- lib/gom/storage/couchdb/saver.rb
Overview
Saves the given draft to a CouchDB document.
Instance Attribute Summary collapse
-
#object_id ⇒ Object
readonly
Returns the value of attribute object_id.
Instance Method Summary collapse
-
#initialize(database, draft, revisions, storage_name) ⇒ Saver
constructor
A new instance of Saver.
- #perform ⇒ Object
Constructor Details
#initialize(database, draft, revisions, storage_name) ⇒ Saver
Returns a new instance of Saver.
7 8 9 |
# File 'lib/gom/storage/couchdb/saver.rb', line 7 def initialize(database, draft, revisions, storage_name) @database, @draft, @revisions, @storage_name = database, draft, revisions, storage_name end |
Instance Attribute Details
#object_id ⇒ Object (readonly)
Returns the value of attribute object_id.
5 6 7 |
# File 'lib/gom/storage/couchdb/saver.rb', line 5 def object_id @object_id end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/gom/storage/couchdb/saver.rb', line 11 def perform initialize_document set_properties set_relations save_document store_revision end |