Module: FileStore::Observer
- Defined in:
- lib/filestore/observer.rb
Overview
Module FileStore::Observer can be mixed in to implement a observer. Observers are notified about actions occurring in the observed subject, an instance of FileStore::SimpleStore or FileStore::MultiTenantFileStore, respectively.
Class Method Summary collapse
-
.included(klass) ⇒ Object
Module hook executed after the inclusion.
Instance Method Summary collapse
-
#notify(msg, subject) ⇒ Object
Method called via the observed subject to inform observers about an action occurred in the observed subject.
Class Method Details
.included(klass) ⇒ Object
Module hook executed after the inclusion. Currently nothing happens here
133 134 |
# File 'lib/filestore/observer.rb', line 133 def self.included(klass) end |
Instance Method Details
#notify(msg, subject) ⇒ Object
Method called via the observed subject to inform observers about an action occurred in the observed subject. Override this method to fit your needs.
Arguments:
msg: Some information about the action
subject: A reference to the observed object
144 145 |
# File 'lib/filestore/observer.rb', line 144 def notify(msg, subject) end |