function wrapMethods(self){
    var methods = ['on'];
    var childObjects = ['stdin','stdout','stderr'];

    // Wrap on method
    methods.forEach(function(m){
        var old = self[m];
        self[m] = function(){
            old.apply(self, arguments);
            return self;
        };
    });

    // If its a spawn object then wrap child EventEmitters
    if(utils.isSpawn(self)){
        childObjects.forEach(function(child){
            methods.forEach(function(m){
                var old = self[child][m];
                self[child][m] = function(){
                    old.apply(self[child], arguments);
                    return self;
                };
            });
        });
    }
}
function wrapMethods(self){
    var methods = ['on'];
    var childObjects = ['stdin','stdout','stderr'];

    // Wrap on method
    methods.forEach(function(m){
        var old = self[m];
        self[m] = function(){
            old.apply(self, arguments);
            return self;
        };
    });

    // If its a spawn object then wrap child EventEmitters
    if(utils.isSpawn(self)){
        childObjects.forEach(function(child){
            methods.forEach(function(m){
                var old = self[child][m];
                self[child][m] = function(){
                    old.apply(self[child], arguments);
                    return self;
                };
            });
        });
    }
}
function wrapMethods ( self ) { var methods = [ 'on' ] ; var childObjects = [ 'stdin' , 'stdout' , 'stderr' ] ; // Wrap on method methods . forEach ( function ( m ) { var old = self [ m ] ; self [ m ] = function ( ) { old . apply ( self , arguments ) ; return self ; } ; } ) ; // If its a spawn object then wrap child EventEmitters if ( utils . isSpawn ( self ) ) { childObjects . forEach ( function ( child ) { methods . forEach ( function ( m ) { var old = self [ child ] [ m ] ; self [ child ] [ m ] = function ( ) { old . apply ( self [ child ] , arguments ) ; return self ; } ; } ) ; } ) ; } }
Function for wrapping default EventEmitter functions to return itself

@param {EventEmitter} self
@returns {EventEmitter}
Function for wrapping default EventEmitter functions to return itself