lib/net/ssh/service/services.rb in net-ssh-0.5.0 vs lib/net/ssh/service/services.rb in net-ssh-0.6.0

- old
+ new

@@ -12,10 +12,12 @@ # net-ssh website : http://net-ssh.rubyforge.org # project website: http://rubyforge.org/projects/net-ssh # ============================================================================= #++ +require 'net/ssh' + module Net module SSH module Service # Register all standard SSH services. @@ -34,9 +36,19 @@ end # Add the services to the services hash. container.services[ :forward ] = container.service.forward.driver container.services[ :process ] = container.service.process.driver + + # Register the external services and add them to the collection of + # known services. + EXTERNAL_SERVICES.each do |name, block| + container.service.register( name, + :model => :singleton_deferred, + &block ) + container.services[ name ] = container.service[ name ] + end + end module_function :register_services end end