Ruby on Rails

Ruby on Rails.

Rails for Zombies.

Rails for Zombie Outlaws.

Rail Casts.

JavaScript: Shared Secrets

function gizmo(id, secret) {
    secret = secret || {}
    secret.id = id;
    return { 
        toString: function () {
            return "gizmo " + secret.id;  
        };
    };
}

function hoozit(id) {
    var secret = {},
        that = gizmo(id, secret);
    that.test = function (testid) {
        return testid === secret.id;
    };
    return that;
}
  • 1
  • 2