Module: Sequel::Plugins

Defined in:
lib/sequel/model/plugins.rb,
lib/sequel/plugins/schema.rb,
lib/sequel/plugins/caching.rb,
lib/sequel/plugins/identity_map.rb,
lib/sequel/plugins/serialization.rb,
lib/sequel/plugins/lazy_attributes.rb,
lib/sequel/plugins/many_through_many.rb,
lib/sequel/plugins/hook_class_methods.rb,
lib/sequel/plugins/validation_helpers.rb,
lib/sequel/plugins/tactical_eager_loading.rb,
lib/sequel/plugins/single_table_inheritance.rb,
lib/sequel/plugins/validation_class_methods.rb

Overview

Empty namespace that plugins should use to store themselves, so they can be loaded via Model.plugin.

Plugins should be modules with one of the following conditions:

  • A singleton method named apply, which takes a model, additional arguments, and an optional block. This is called once, the first time the plugin is loaded, with the arguments and block provide to the call to Model.plugin.
  • A module inside the plugin module named InstanceMethods, which will be included in the model class.
  • A module inside the plugin module named ClassMethods, which will extend the model class.
  • A module inside the plugin module named DatasetMethods, which will extend the model's dataset.
  • A singleton method named configure, which takes a model, additional arguments, and an optional block. This is called every time the Model.plugin method is called.

Defined Under Namespace

Modules: Caching, HookClassMethods, IdentityMap, LazyAttributes, ManyThroughMany, Schema, Serialization, SingleTableInheritance, TacticalEagerLoading, ValidationClassMethods, ValidationHelpers