Sha256: edbe7ad170d05f426c948a4f9d9109691877382a66d5d5ea94e7184449536d40

Contents?: true

Size: 690 Bytes

Versions: 132

Compression:

Stored size: 690 Bytes

Contents

/**@constructor*/
function Reflection(obj) {
	this.obj = obj;
}

Reflection.prototype.getConstructorName = function() {
	if (this.obj.constructor.name) return this.obj.constructor.name;
	var src = this.obj.constructor.toSource();
	var name = src.substring(name.indexOf("function")+8, src.indexOf('(')).replace(/ /g,'');
	return name;
}

Reflection.prototype.getMethod = function(name) {
	for (var p in this.obj) {
		if (p == name && typeof(this.obj[p]) == "function") return this.obj[p];
	}
	return null;
}

Reflection.prototype.getParameterNames = function() {
	var src = this.obj.toSource();
	src = src.substring(
		src.indexOf("(", 8)+1, src.indexOf(")")
	);
	return src.split(/, ?/);
}

Version data entries

132 entries across 131 versions & 14 rubygems

Version Path
hquery-patient-api-1.1.1 doc/jsdoc-toolkit/app/frame/Reflection.js
hquery-patient-api-1.1.0 doc/jsdoc-toolkit/app/frame/Reflection.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/JSV/jsdoc-toolkit/app/frame/Reflection.js
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/JSV/jsdoc-toolkit/app/frame/Reflection.js
quentonc-jsdoc_helper-0.0.2 ext/jsdoc-toolkit/app/frame/Reflection.js
quentonc-jsdoc_helper-0.0.2 test/ext/jsdoc-toolkit/app/frame/Reflection.js
sproutit-sproutcore-1.0.20090721145236 vendor/jsdoc/app/frame/Reflection.js
sproutit-sproutcore-1.0.20090721145251 vendor/jsdoc/app/frame/Reflection.js
sproutit-sproutcore-1.0.20090721145280 vendor/jsdoc/app/frame/Reflection.js
sproutit-sproutcore-1.0.20090721145281 vendor/jsdoc/app/frame/Reflection.js
sproutit-sproutcore-1.0.20090721145282 vendor/jsdoc/app/frame/Reflection.js
sproutit-sproutcore-1.0.20090721145285 vendor/jsdoc/app/frame/Reflection.js
sproutit-sproutcore-1.0.203 vendor/jsdoc/app/frame/Reflection.js
hquery-patient-api-1.0.4 doc/jsdoc-toolkit/app/frame/Reflection.js
hquery-patient-api-1.0.3 doc/jsdoc-toolkit/app/frame/Reflection.js
hquery-patient-api-1.0.2 doc/jsdoc-toolkit/app/frame/Reflection.js
hquery-patient-api-1.0.1 doc/jsdoc-toolkit/app/frame/Reflection.js
jsc3d-rails-1.0 vendor/assets/javascripts/tools/doc_generator/app/frame/Reflection.js
hquery-patient-api-1.0.0 doc/jsdoc-toolkit/app/frame/Reflection.js
hquery-patient-api-0.3.0 doc/jsdoc-toolkit/app/frame/Reflection.js