Class: Block Abstract

Defined in: lib/corelib/

Class Method Summary

Instance Method Summary

Class Method Details

+ (void) create(block, thisArg)

Block.create returns a different implementation of Block (BlockMulti, BlockSingle) depending on the arity of block.

If no block is given returns a BlockArgs callback, that returns a single block argument.

+ (void) supportMultipleArgs(block)

if block has multiple arguments, returns a wrapper function that applies arguments to block instead of passing. Otherwise it returns the block itself.

Instance Method Details

- (void) invoke()

- (void) invokeSplat()

Use invokeSplat applies the arguments to the block.


each_with_object: (obj) ->
   @each (el) ->
     callback.invokeSplat(el, obj)

- (void) args()