lib/arborist.rb in arborist-0.0.1.pre20160106113421 vs lib/arborist.rb in arborist-0.0.1.pre20160128152542

- old
+ new

@@ -15,11 +15,11 @@ # Package version VERSION = '0.0.1' # Version control revision - REVISION = %q$Revision: fddcbace9b6d $ + REVISION = %q$Revision: e23d2b9f8f31 $ # The name of the environment variable which can be used to set the config path CONFIG_ENV = 'ARBORIST_CONFIG' @@ -109,39 +109,38 @@ define_method( name, &body ) end end - ### Return a new Arborist::Manager for the nodes described in files under - ### the specified +directory+. - def self::manager_for( directory ) + ### Return a new Arborist::Manager for the nodes loaded by the specified +loader+. + def self::manager_for( loader ) self.load_all - nodes = Arborist::Node.each_in( directory ) + nodes = Arborist::Node.each_in( loader ) manager = Arborist::Manager.new manager.load_tree( nodes ) return manager end ### Return a new Arborist::MonitorRunner for the monitors described in files under - ### the specified +directory+. - def self::monitor_runner_for( directory ) + ### the specified +loader+. + def self::monitor_runner_for( loader ) self.load_all - monitors = Arborist::Monitor.each_in( directory ) + monitors = Arborist::Monitor.each_in( loader ) runner = Arborist::MonitorRunner.new runner.load_monitors( monitors ) return runner end ### Return a new Arborist::ObserverRunner for the observers described in files under - ### the specified +directory+. - def self::observer_runner_for( directory ) + ### the specified +loader+. + def self::observer_runner_for( loader ) self.load_all - observers = Arborist::Observer.each_in( directory ) + observers = Arborist::Observer.each_in( loader ) runner = Arborist::ObserverRunner.new runner.load_observers( observers ) return runner end @@ -169,14 +168,16 @@ require 'arborist/exceptions' require 'arborist/mixins' autoload :Client, 'arborist/client' autoload :Event, 'arborist/event' + autoload :Loader, 'arborist/loader' autoload :Manager, 'arborist/manager' autoload :Monitor, 'arborist/monitor' autoload :MonitorRunner, 'arborist/monitor_runner' autoload :Node, 'arborist/node' autoload :Observer, 'arborist/observer' + autoload :ObserverRunner, 'arborist/observer_runner' autoload :Subscription, 'arborist/subscription' end # module Arborist