Sha256: 1be0f21b7dee573854dc6d8926a180b97295fa0163b9ab62bb29092698125195

Contents?: true

Size: 1.3 KB

Versions: 1

Compression:

Stored size: 1.3 KB

Contents

// wrapped by build app
define("dojox/lang/oo/Filter", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.lang.oo.Filter");

(function(){
	var oo = dojox.lang.oo,

	F = oo.Filter = function(bag, filter){
		// summary:
		//		Filter to control mixing in objects by skipping
		//		properties and renaming them.
		// description:
		//		This object is used as a holder of an original object
		//		(whose properties are to be copied), and a filter
		//		function used while copying by dojox.lang.oo.mixin.
		// bag: Object
		//		object to be filtered
		// filter: Function|Object
		//		a function to handle the name filtering,
		//		or an object with exec() method
		this.bag = bag;
		this.filter = typeof filter == "object" ?
			function(){ return filter.exec.apply(filter, arguments); } : filter;
	},

	// the default map-based filter object
	MapFilter = function(map){
		this.map = map;
	};

	MapFilter.prototype.exec = function(name){
		return this.map.hasOwnProperty(name) ? this.map[name] : name;
	};

	oo.filter = function(bag, map){
		// summary:
		//		creates a simple filter object
		// bag: Object
		//		object to be filtered
		// map: Object
		//		the dictionary for renaming/removing while copying
		// returns:
		//		new dojox.lang.oo.Filter object
		return new F(bag, new MapFilter(map));
	};
})();

});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dojox-rails-0.11.0 vendor/assets/javascripts/lang/oo/Filter.js.uncompressed.js