This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
No gems have been built for this project yet.
dm-more / dm-observer
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
History.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
LICENSE | Wed Jun 11 18:30:22 -0700 2008 | [djwonk] |
| |
Manifest.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
README.txt | Fri Jul 18 12:02:56 -0700 2008 | [Bernerd Schaefer] |
| |
Rakefile | Thu Jul 24 14:00:08 -0700 2008 | [bernerdschaefer] |
| |
TODO | Wed Jun 11 18:30:22 -0700 2008 | [djwonk] |
| |
lib/ | Thu Jul 24 14:05:36 -0700 2008 | [bernerdschaefer] |
| |
spec/ | Thu Jul 24 14:05:36 -0700 2008 | [bernerdschaefer] |
README.txt
== README
DataMapper::Observer allows you to add callback hooks to many models. This is
similar to observers in ActiveRecord.
Example:
class Adam
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
end
class AdamObserver
include DataMapper::Observer
observe Adam
before :save do
# log message
end
before :get_drunk do
# eat something
end
after_class_method :unite do
raise "Call for help!"
end
end





