Module: Ripple::Document::Persistence::ClassMethods
- Defined in:
- lib/ripple/document/persistence.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(*args, &block) ⇒ Object
Instantiates a new record, applies attributes from a block, and saves it.
-
#destroy_all ⇒ Object
Destroys all records one at a time.
Instance Attribute Details
#quorums ⇒ Object
24 25 26 |
# File 'lib/ripple/document/persistence.rb', line 24 def quorums @quorums ||= {} end |
Instance Method Details
#create(*args, &block) ⇒ Object
Instantiates a new record, applies attributes from a block, and saves it
11 12 13 |
# File 'lib/ripple/document/persistence.rb', line 11 def create(*args, &block) new(*args, &block).tap {|s| s.save } end |
#destroy_all ⇒ Object
Destroys all records one at a time. Place holder while :delete to bucket is being developed.
17 18 19 |
# File 'lib/ripple/document/persistence.rb', line 17 def destroy_all list(&:destroy) end |