Class: Copland::ServiceModel::PrototypeDeferredServiceModel

Inherits:
AbstractServiceModel show all
Defined in:
lib/copland/models/prototype-deferred.rb

Overview

This is the “deferred instantiation” variety of the PrototypeServiceModel. Instead of immediately instantiating the service point, it instead wraps the service point in a new Proxy instance and returns that.

Instance Attribute Summary

Attributes inherited from AbstractServiceModel

#service_point

Instance Method Summary collapse

Methods inherited from AbstractServiceModel

#initialize, register_as

Constructor Details

This class inherits a constructor from Copland::ServiceModel::AbstractServiceModel

Instance Method Details

#instance(&block) ⇒ Object

Returns a new Proxy instance that wraps the service point.



48
49
50
# File 'lib/copland/models/prototype-deferred.rb', line 48

def instance( &block )
  Proxy.new( @service_point, &block )
end