Module: Tenacity

Includes:
Associations::BelongsTo, Associations::HasMany, Associations::HasOne, InstanceMethods
Defined in:
lib/tenacity.rb,
lib/tenacity/errors.rb,
lib/tenacity/version.rb,
lib/tenacity/association.rb,
lib/tenacity/class_methods.rb,
lib/tenacity/orm_ext/ripple.rb,
lib/tenacity/orm_ext/sequel.rb,
lib/tenacity/associate_proxy.rb,
lib/tenacity/orm_ext/mongoid.rb,
lib/tenacity/orm_ext/helpers.rb,
lib/tenacity/associates_proxy.rb,
lib/tenacity/orm_ext/toystore.rb,
lib/tenacity/instance_methods.rb,
lib/tenacity/orm_ext/couchrest.rb,
lib/tenacity/orm_ext/datamapper.rb,
lib/tenacity/orm_ext/mongo_mapper.rb,
lib/tenacity/associations/has_one.rb,
lib/tenacity/orm_ext/activerecord.rb,
lib/tenacity/associations/has_many.rb,
lib/tenacity/associations/belongs_to.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Associations, ClassMethods, InstanceMethods, OrmExt Classes: AssociateProxy, AssociatesProxy, Association, ObjectDoesNotExistError, ObjectIdInUseError, ReadOnlyError, TenacityError

Constant Summary

VERSION =
"0.6.0"

Class Method Summary collapse

Methods included from Associations::HasOne

#_t_cleanup_has_one_association

Methods included from Associations::HasMany

#_t_cleanup_has_many_association, #_t_get_associate_ids, #_t_remove_associates

Methods included from Associations::BelongsTo

#_t_cleanup_belongs_to_association

Methods included from InstanceMethods

#_t_ivar_name, #_t_save_autosave_associations, #_t_verify_associates_exist

Class Method Details

.included(model) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/tenacity.rb', line 29

def self.included(model)
  OrmExt::ActiveRecord.setup(model)
  OrmExt::CouchRest.setup(model)
  OrmExt::DataMapper.setup(model)
  OrmExt::MongoMapper.setup(model)
  OrmExt::Mongoid.setup(model)
  OrmExt::Ripple.setup(model)
  OrmExt::Sequel.setup(model)
  OrmExt::Toystore.setup(model)

  raise "Tenacity does not support the database client used by #{model}" unless model.respond_to?(:_t_find)
  model.extend(ClassMethods)
  model._t_initialize_tenacity
end