Class: Unbreakable::Observers::Log
- Defined in:
- lib/unbreakable/observers/log.rb
Overview
Logs debug messages when files are stored or skipped if the observed object has a #log
method.
Instance Attribute Summary
Attributes inherited from Observer
Instance Method Summary collapse
Methods inherited from Observer
Constructor Details
This class inherits a constructor from Unbreakable::Observers::Observer
Instance Method Details
#update(method, *args) ⇒ void
This method returns an undefined value.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/unbreakable/observers/log.rb', line 7 def update(method, *args) if observed.respond_to? :log case method when :store observed.log.debug "Store #{args.first}" when :skip observed.log.debug "Skip #{args.first}" end end end |