Class: ActivePStore::Base
- Inherits:
-
Object
- Object
- ActivePStore::Base
- Extended by:
- ConnectionHandling, DynamicMatchers, FinderMethods, Inheritance, QueryMethods, Querying
- Includes:
- Core, Persistence
- Defined in:
- lib/active_pstore/base.rb
Instance Attribute Summary
Attributes included from Persistence
Class Method Summary collapse
Methods included from ConnectionHandling
establish_connection, use_connection
Methods included from DynamicMatchers
Methods included from FinderMethods
find, find_by, find_by!, first, last, take
Methods included from Inheritance
Methods included from Querying
count, destroy_all, emtpy?, update_all
Methods included from QueryMethods
Methods included from Persistence
#destroy, #new_record?, #save, #update_attribute, #update_attributes
Methods included from Core
Class Method Details
.all ⇒ Object
13 14 15 16 17 |
# File 'lib/active_pstore/base.rb', line 13 def all use_connection do |connection| ActivePStore::Collection.new(connection[self.pstore_key] || []) end end |
.pstore_key ⇒ Object
19 20 21 |
# File 'lib/active_pstore/base.rb', line 19 def pstore_key self.to_s end |