Sha256: 6dcf2a6c244429c47fb4f7eb616d7650cef168d1ce66791e0510f040df4b2fa6
Contents?: true
Size: 617 Bytes
Versions: 3
Compression:
Stored size: 617 Bytes
Contents
module Bowline module Binders class Observer attr_reader :binder def initialize(binder) @binder = binder end def after_create(rec) binder.created(rec) end def after_update(rec) binder.updated(rec) end def after_destroy(rec) binder.removed(rec) end def update(observed_method, object) #:nodoc: send(observed_method, object) if respond_to?(observed_method) end def observed_class_inherited(subclass) #:nodoc: subclass.add_observer(self) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bowline-0.6.2 | lib/bowline/binders/observer.rb |
bowline-0.6.1 | lib/bowline/binders/observer.rb |
bowline-0.6.0 | lib/bowline/binders/observer.rb |