use of mootools protect

by ariehg

JavaScript

var My = new Class({
    initialize: function() {
        this.log();
    },
    log: function() {
        console.log('a');
    }.protect()
});

var a = new My();
a.log();