Module: Cistern::Data

Defined in:
lib/cistern/data.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Hash, Redis

Class Method Summary collapse

Class Method Details

.backend(*args, &block) ⇒ Object



11
12
13
14
15
# File 'lib/cistern/data.rb', line 11

def self.backend(*args, &block)
  engine, options = args

  Cistern::Data.backends[engine].new(options || {}, &block)
end

.backendsObject



7
8
9
# File 'lib/cistern/data.rb', line 7

def self.backends
  @backends ||= {}
end

.extended(klass) ⇒ Object



2
3
4
5
# File 'lib/cistern/data.rb', line 2

def self.extended(klass)
  klass.send(:extend, ClassMethods)
  klass.send(:include, InstanceMethods)
end