var Vehiculo = new Class ({ ruedas:4, nombre: 'Base', encender: function() { alert('Vehiculo "' + this.getNombre() + '" encendido'); } getNombre: function() { return this.nombre; } }); Vehiculo.implement ({ acelerar: function() { alert('Base esta acelerando'); } }); var boby = new Vehiculo(); boby.encender(); boby.acelerar(); |