Sha256: 473aedaadc6de1b586a5ede6402c4a1604beaa9c20b64911c76b0d5d69ec57a3
Contents?: true
Size: 463 Bytes
Versions: 17
Compression:
Stored size: 463 Bytes
Contents
== 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, Serial 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
Version data entries
17 entries across 17 versions & 2 rubygems