lib/arborist/observer.rb in arborist-0.2.0.pre20170519125456 vs lib/arborist/observer.rb in arborist-0.2.0
- old
+ new
@@ -1,9 +1,10 @@
# -*- ruby -*-
#encoding: utf-8
require 'arborist' unless defined?( Arborist )
+require 'arborist/client'
# The Arborist entity responsible for observing changes to the tree and
# reporting on them.
class Arborist::Observer
@@ -119,9 +120,16 @@
### Register a summary action.
def summarize( options={}, &block )
@actions << Arborist::Observer::Summarize.new( options, &block )
+ end
+
+
+ ### Return a client singleton for optional observer callbacks to the
+ ### manager.
+ def client
+ return Arborist::Client.instance
end
#
# Observe Methods