Class: ActivePStore::Base

Inherits:
Object
  • Object
show all
Extended by:
ConnectionHandling, DynamicMatchers, FinderMethods, Inheritance, ModelSchema, QueryMethods, Querying, SingleForwardable
Includes:
Core, Persistence
Defined in:
lib/active_pstore/base.rb

Instance Attribute Summary

Attributes included from Persistence

#id

Class Method Summary collapse

Methods included from ConnectionHandling

establish_connection, use_connection

Methods included from DynamicMatchers

respond_to?

Methods included from FinderMethods

find, find_by, find_by!, first, last, take

Methods included from Inheritance

new

Methods included from Querying

count, destroy_all, update_all

Methods included from QueryMethods

where

Methods included from ModelSchema

pstore_key

Methods included from Persistence

#destroy, #new_record?, #save, #update, #update_attribute

Methods included from Core

#==, #hash

Class Method Details

.allObject



20
21
22
23
24
# File 'lib/active_pstore/base.rb', line 20

def all
  use_connection do |connection|
    ActivePStore::Collection.new(connection[self.pstore_key] || [])
  end
end