Module: DataMapper::Observer

Defined in:
lib/dm-observer/observer.rb

Overview

Observers allow you to add callback hooks to DataMapper::Resource objects in a separate class. This is great for separating out logic that is not really part of the model, but needs to be triggered by a model, or models.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



9
10
11
# File 'lib/dm-observer/observer.rb', line 9

def self.included(klass)
  klass.extend(ClassMethods)
end