Module: CaRuby::Database::Persistifier

Included in:
CaRuby::Database
Defined in:
lib/caruby/database/persistifier.rb

Overview

Database Persistable mediator. A module which includes Persistifier must implement the Reader#fetch_association method.

Instance Method Summary collapse

Instance Method Details

#clearObject

Clears the cache.



22
23
24
# File 'lib/caruby/database/persistifier.rb', line 22

def clear
  @cache.clear if @cache
end

#initializeObject

Adds query capability to this Database.



14
15
16
17
18
19
# File 'lib/caruby/database/persistifier.rb', line 14

def initialize
  super
  @ftchd_vstr = Jinx::ReferenceVisitor.new { |ref| ref.class.fetched_domain_attributes }
  # the demand loader
  @lazy_loader = LazyLoader.new { |obj, pa| lazy_load(obj, pa) }
end