Module: DataMapper::Observer

Included in:
FooObserver
Defined in:
lib/gems/dm-observer-0.9.9/lib/dm-observer.rb,
lib/gems/dm-observer-0.9.9/lib/dm-observer/version.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

Constant Summary collapse

VERSION =
'0.9.9'

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



7
8
9
# File 'lib/gems/dm-observer-0.9.9/lib/dm-observer.rb', line 7

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