lib/poolparty/net/init.rb in fairchild-poolparty-1.1.5 vs lib/poolparty/net/init.rb in fairchild-poolparty-1.2.12
- old
+ new
@@ -1,11 +1,16 @@
-# Load the core net libraries. These are neccessary for any of the remoter_bases to function.
-%w(remote_instance messenger remote_bases remoter_base).each do |file|
- require File.join(::File.dirname(__FILE__),file+'.rb')
+class Object
+ #TODO: deprecate. use RemoterBase.available_bases instead
+ def remote_bases
+ PoolParty::Remote.available
+ end
end
-# Register available remoter_bases
-Dir["#{::File.dirname(__FILE__)}/remoter_bases/*/*.rb"].each do |base|
- name = File.join(::File.basename(base, ::File.extname(base)))
+# Load the core net libraries.
+# These are neccessary for any of the remoter_bases to function.
+require ::File.join(::File.dirname(__FILE__),'remoter_base.rb')
+require ::File.join(::File.dirname(__FILE__),'remote_instance.rb')
+
+Dir["#{::File.dirname(__FILE__)}/remoter_bases/*/*.rb"].each do |base|
+ name = ::File.basename(base, ::File.extname(base))
require base
- register_remote_base name
end
\ No newline at end of file