Method: Copland::Interceptor#instantiate

Defined in:
lib/copland/interceptor.rb

#instantiateObject

Return an instance of the interceptor service that is wrapped by this object. This is done by invoking the #create_instance method on the factory service. If the factory service point has a schema associated with it, it will be used to pre-process the parameters.



109
110
111
112
113
114
115
116
117
118
119
# File 'lib/copland/interceptor.rb', line 109

def instantiate
  @factory = @point.instance unless @factory

  parms = @construction_parms
  schema = @point.schema
  if schema.respond_to?( :process )
    parms = schema.process( point, owner, parms )
  end

  @factory.create_instance( @owner, parms )
end