This is the deferred variety of the Singleton service model. Instead of immediately instantiating the service point when requested to, it instead wraps the service point in a Proxy object, which will cause the service point to be instantiated as soon as a method is invoked on the Proxy. Then, the proxy will forward all subsequent calls to the service itself.
Creates an instance of Proxy that encapsulates the service point.
# File lib/copland/models/singleton-deferred.rb, line 49 49: def new_instance( &init ) 50: @instance = Proxy.new( @service_point, &init ) 51: end