Class: Needle::InterceptorChainBuilder::InterceptedServiceProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/needle/interceptor-chain.rb

Overview

This is just a trivial proxy class that is used to wrap a service before the interceptors are applied to it. This additional level of abstraction prevents the need for mangling the names of the service’s methods, and also offers those applications that need it the ability to invoke methods of the service without going through the interceptors.

The proxy will be decorated with dynamically appended methods by the InterceptorChainBuilder#build method.

Instance Method Summary collapse

Constructor Details

#initialize(chain) ⇒ InterceptedServiceProxy

Create a new InterceptedServiceProxy that wraps the given interceptor chain.



91
92
93
# File 'lib/needle/interceptor-chain.rb', line 91

def initialize( chain )
  @chain = chain
end