Module: Ripple::Document::Persistence::ClassMethods
- Defined in:
- ripple/lib/ripple/document/persistence.rb
Instance Attribute Summary (collapse)
Instance Method Summary (collapse)
-
- (Object) create(attrs = {}, &block)
Instantiates a new record, applies attributes from a block, and saves it.
-
- (Object) destroy_all
Destroys all records one at a time.
Instance Attribute Details
- (Object) quorums
38 39 40 |
# File 'ripple/lib/ripple/document/persistence.rb', line 38 def quorums @quorums ||= {} end |
Instance Method Details
- (Object) create(attrs = {}, &block)
Instantiates a new record, applies attributes from a block, and saves it
25 26 27 |
# File 'ripple/lib/ripple/document/persistence.rb', line 25 def create(attrs={}, &block) new(attrs, &block).tap {|s| s.save } end |
- (Object) destroy_all
Destroys all records one at a time. Place holder while :delete to bucket is being developed.
31 32 33 |
# File 'ripple/lib/ripple/document/persistence.rb', line 31 def destroy_all all(&:destroy) end |