Sha256: d828d0c8e317603772d26289cc1635cd7563fc06e92cfe9c7e9e093778272b35

Contents?: true

Size: 417 Bytes

Versions: 27

Compression:

Stored size: 417 Bytes

Contents

class Tasks
  @do: ( methods, scope={} ) ->
    that_methods = methods
    new (
      () ->
        for index of scope
          this[index] = scope[index]
        methods_array = []
        original_methods = that_methods
        that = this
        for index of original_methods
          methods_array.push( original_methods[ index ].bind(that) )
        Async.waterfall( methods_array )
    )()

@Tasks = Tasks

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
arcabouco-0.2.16 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.15 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.14 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.13 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.12 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.11 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.10 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.9 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.8 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.7 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.6 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.5 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.4 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.3 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.2 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.1 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.2.0 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.1.9 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.1.8 lib/assets/js/vendor/tasks.js.coffee
arcabouco-0.1.7 lib/assets/js/vendor/tasks.js.coffee