scratch-html5/test/artifacts/IOMock.js

26 lines
502 B
JavaScript
Raw Normal View History

2014-03-08 02:46:59 -05:00
'use strict';
var ioMock = function() {
var args = createArgs(arguments);
function getArgs(argKey) {
return ((argKey in args) ? args[argKey] : null);
}
function createArgs(methodArgs) {
var args = {};
if (methodArgs.length) {
_.each(methodArgs, function(newObject) {
_.each(newObject, function(value, key) {
args[key] = value;
});
});
}
return args;
}
return {
'getCount' : function() { return getArgs('getCount'); }
}
};