module Unbreakable module Observers # Abstract class for observers following the Ruby # {http://ruby-doc.org/stdlib/libdoc/observer/rdoc/index.html stdlib} # implementation of the _Observer_ object-oriented design pattern. See # {Unbreakable::Observers::Log} for an example. # # The following instance methods must be implemented in sub-classes: # # * +update+ class Observer attr_reader :observed # @param observed the observed object def initialize(observed) @observed = observed end # @param [Symbol] method the method called on the observed object # @param [Array] args the arguments to the method # @return [void] def update(method, *args) raise NotImplementedError end end end end