[Copy] #338 updated code style in CreationPolicy

This commit is contained in:
Henry 2015-12-03 16:22:45 -08:00
parent 96249e6bcc
commit f8099550bd

View File

@ -27,23 +27,19 @@ define(
"use strict";
/**
* A policy for determining whether objects of a certain type can be
* A policy for determining whether objects of a given type can be
* created.
* @returns {{allow: Function}}
* @constructor
* @implements {Policy}
* @memberof platform/commonUI/browse
*/
function CreationPolicy() {
return {
/**
* Only allow creation of object types that have the
* Creation capability
*/
allow: function (type) {
return type.hasFeature("creation");
}
};
}
CreationPolicy.prototype.allow = function (type) {
return type.hasFeature("creation");
};
return CreationPolicy;
}
);