lib/openwfe/contextual.rb in openwferu-0.9.5 vs lib/openwfe/contextual.rb in openwferu-0.9.6

- old
+ new

@@ -71,11 +71,17 @@ # The service_name can be a String or a Symbol (which will be # turned into a String). # def init_service (service_name, service_class) - @application_context[service_name.to_s] = - service_class.new(service_name, @application_context) + s = service_class.new(service_name, @application_context) + + s.service_name = "#{service_class.name}::#{s.object_id}" \ + unless service_name + + @application_context[s.service_name.to_s] = s + + return s end end end