### Home Classes Methods

### In Files

- lib/needle/pipeline/interceptor.rb

### Parent

Needle::Pipeline::Element

### Methods

- #call
- #initialize_element

### Files

- README

### Class/Module Index

Quicksearch

- Needle
- Needle::Bug
- Needle::Container
- Needle::DefinitionContext
- Needle::IncludeExclude
- Needle::Interceptor
- Needle::Interceptor::DynamicInterceptor
- Needle::InterceptorChainBuilder
- Needle::InterceptorChainBuilder::InterceptedServiceProxy
- Needle::InterceptorChainBuilder::InterceptorChainElement
- Needle::InterceptorChainBuilder::ProxyObjectChainElement
- Needle::InterceptorConfigurationError
- Needle::Lifecycle
- Needle::Lifecycle::Deferred
- Needle::Lifecycle::Initialize
- Needle::Lifecycle::Multiton
- Needle::Lifecycle::Proxy
- Needle::Lifecycle::Singleton
- Needle::Lifecycle::Threaded
- Needle::LogFactory
- Needle::Logger
- Needle::LoggingInterceptor
- Needle::NeedleError
- Needle::Pipeline
- Needle::Pipeline::Collection
- Needle::Pipeline::Collection::BlockElement
- Needle::Pipeline::Element
- Needle::Pipeline::InterceptorElement
- Needle::QueryableMutex
- Needle::Registry
- Needle::ServiceNotFound
- Needle::ServicePoint
- Needle::Version

No matching classes.

# Needle::Pipeline::InterceptorElement

The pipeline element that implements adding interceptors to a service.

### Attributes

interceptors[R]

The array of interceptors to be proxied onto the object.

### Public Instance Methods

call( container, point, *args ) click to toggle source

Invokes the next element in the chain and adds the interceptors to the result, returning a proxy object wrapped by the interceptors.

    # File lib/needle/pipeline/interceptor.rb, line 38
    def call( container, point, *args )
      service = succ.call( container, point, *args )
      InterceptorChainBuilder.build( point, service, @interceptors )
    end

initialize_element() click to toggle source

Initializes the array of interceptors. It is initially empty.

    # File lib/needle/pipeline/interceptor.rb, line 32
    def initialize_element
      @interceptors = []
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.