1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
/*
values for exposes:
true: all set/getFoo are converted to setters/getters
false: do nothing
string: "foo" => only convert get/setFoo to setters getters if present
array of strings: like above, but for each string
*/
if attributes !== true attributes = $splatattributes;
for method in self
var match = methodmatch/^(get|set)([A-Z])(\w*)$/;
if match
var prop = match2toLowerCase + match3;
if attributes !== true && !attributescontainsprop continue;
selfmatch1 == 'get' ? '__defineGetter__' : '__defineSetter__'propselfmethod;
;
|
Pastie
