### Home Classes Methods

### In Files

- lib/needle/pipeline/collection.rb

### Parent

Element

### Methods

- ::new
- #call

### 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::Collection::BlockElement

Wraps a block as a new pipeline element. When the element is invoked, control is delegated to the block.

### Public Class Methods

new( point, name, priority, options, block ) click to toggle source

Create a new pipeline element around the given block.

    # File lib/needle/pipeline/collection.rb, line 34
    def initialize( point, name, priority, options, block )
      super( point, name, priority, options )
      @block = block
    end

### Public Instance Methods

call( *args ) click to toggle source

Invoke the block. The block must accept as many parameters as the pipeline expects, plus 1 (the first parameter is always this BlockElement instance).

    # File lib/needle/pipeline/collection.rb, line 42
    def call( *args )
      @block.call( self, *args )
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.