Sha256: b2e357d6c514d6e39db00298bf6bed412445bd808e5b98d105a634b0183f9e25

Contents?: true

Size: 551 Bytes

Versions: 19

Compression:

Stored size: 551 Bytes

Contents

Smoke.Stub = function(obj,attr) {
	this.obj = obj;
	this.attribute = attr;
	this.and_return(this.defaultReturn);
};

Smoke.Stub.prototype = {
	defaultReturn: null, 
	property: function(p){
		this.property = p;
		this.and_set_to(this.defaultReturn);
		return this
	},
	method: function(f){
		this.func = f;
		this.and_return(this.defaultReturn);
		return this
	},
	and_return: function(v){
		this.obj[this.attribute] = function() {
			return v
		};
		return this.obj
	},
	and_set_to: function(v){
		this.obj[this.attribute] = v;
		return this.obj
	}
};

Version data entries

19 entries across 19 versions & 4 rubygems

Version Path
rsutphin-shenandoah-0.1.0 lib/shenandoah/javascript/common/smoke.stub.js
rsutphin-shenandoah-0.1.1 lib/shenandoah/javascript/common/smoke.stub.js
rsutphin-shenandoah-0.1.2 lib/shenandoah/javascript/common/smoke.stub.js
screw_server-0.1.14 assets/vendor/smoke/lib/smoke.stub.js
screw_server-0.1.13 assets/vendor/smoke/lib/smoke.stub.js
screw_server-0.1.12 assets/vendor/smoke/lib/smoke.stub.js
screw_server-0.1.11 assets/vendor/smoke/lib/smoke.stub.js
screw_server-0.1.10 assets/vendor/smoke/lib/smoke.stub.js
screw_server-0.1.9 assets/vendor/smoke/lib/smoke.stub.js
screw_server-0.1.8 assets/vendor/smoke/lib/smoke.stub.js
drogus-blue-ridge-0.0.3 lib/smoke.stub.js
drogus-blue-ridge-0.0.2 lib/smoke.stub.js
drogus-blue-ridge-0.0.1 lib/smoke.stub.js
shenandoah-0.2.0 lib/shenandoah/javascript/common/smoke.stub.js
shenandoah-0.1.3 lib/shenandoah/javascript/common/smoke.stub.js
shenandoah-0.1.0 lib/shenandoah/javascript/common/smoke.stub.js
shenandoah-0.1.1 lib/shenandoah/javascript/common/smoke.stub.js
shenandoah-0.1.2 lib/shenandoah/javascript/common/smoke.stub.js
shenandoah-0.0.0 lib/shenandoah/javascript/common/smoke.stub.js