Module: Riik::Document::Persistence
- Defined in:
- lib/riik/document/persistence.rb
Overview
Persistence provides methods for creating and saving documents to Riak.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#destroy ⇒ Boolean
Destroy the object in Riak.
-
#save ⇒ Boolean
Save the object to Riak.
Class Method Details
.included(base) ⇒ Object
8 9 10 |
# File 'lib/riik/document/persistence.rb', line 8 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#destroy ⇒ Boolean
Destroy the object in Riak.
38 39 40 |
# File 'lib/riik/document/persistence.rb', line 38 def destroy robject.delete end |
#save ⇒ Boolean
Save the object to Riak.
29 30 31 32 |
# File 'lib/riik/document/persistence.rb', line 29 def save robject.data = attributes robject.store end |