Module Familia::ClassMethods
In: lib/familia/object.rb

Auto-extended into a class that includes Familia

Methods

Attributes

parent  [RW] 

Public Instance methods

Note idx needs to be an appropriate index for the given class. If the index is multi-value it must be passed as an Array in the proper order. Does not call save.

 TODO: grab db, ttl, uri from parent

def parent=(a) @parent = a end def parent(a=nil) @parent = a if a; @parent end

Creates a class method called name that returns an instance of the RedisObject klass

Creates an instance method called name that returns an instance of the RedisObject klass

Returns an instance based on idx otherwise it creates and saves a new instance base on idx. See from_index

idx can be a value or an Array of values used to create the index. We don‘t enforce a default suffix; that‘s left up to the instance. A nil suffix will not be included in the key.

[Validate]