Permalink
Browse files

[ ! ] Ultra Small Async Task Handling

  • Loading branch information...
0 parents commit 9ce1f2c463a1c4a21f75f8c67a6dca91c1954e30 @pnegri committed Feb 27, 2012
Showing with 42 additions and 0 deletions.
  1. +1 −0 README.md
  2. +18 −0 lib/main.coffee
  3. +4 −0 main.js
  4. +19 −0 package.json
@@ -0,0 +1 @@
+# Async Method Handling for Arcabouco-JS
@@ -0,0 +1,18 @@
+Fs = require 'fs'
+Path = require 'path'
+Async = require 'async'
+
+class Tasks
+ @do: ( methods ) ->
+ that_methods = methods
+ new (
+ () ->
+ 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 )
+ )()
+
+module.exports = Tasks
@@ -0,0 +1,4 @@
+require('coffee-script');
+arcaboucoTasks = require(__dirname + '/lib/main.coffee');
+module.exports = arcaboucoTasks;
+
@@ -0,0 +1,19 @@
+{
+ "name" : "arcabouco-tasks",
+ "description" : "async handlers for arcabouco-js",
+ "version" : "0.1.1",
+ "author" : "Patrick Negri <patrick@iugu.com.br>",
+ "homepage": "http://github.com/pnegri/arcabouco-js-tasks",
+ "contributors" : [],
+ "main" : "./main.js",
+ "directories": {
+ "lib":"./lib"
+ },
+ "dependencies" : {
+ },
+ "repository" : {
+ "type":"git",
+ "url":"git://github.com/pnegri/arcabouco-js-tasks.git"
+ },
+ "engines" : { "node" : ">= 0.4.0 < 0.7.0" }
+}

0 comments on commit 9ce1f2c

Please sign in to comment.