arcabouco 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ class Tasks
2
+ @do: ( methods, scope={} ) ->
3
+ that_methods = methods
4
+ new (
5
+ () ->
6
+ for index of scope
7
+ this[index] = scope[index]
8
+ methods_array = []
9
+ original_methods = that_methods
10
+ that = this
11
+ for index of original_methods
12
+ methods_array.push( original_methods[ index ].bind(that) )
13
+ Async.waterfall( methods_array )
14
+ )()
15
+
16
+ @Tasks = Tasks
17
+