Refactor adaptor & driver to pure JS style

This commit is contained in:
deadprogram 2014-02-27 09:38:38 -08:00
parent 74efee0809
commit 8b88e5dc10
2 changed files with 60 additions and 76 deletions

View File

@ -2,24 +2,18 @@
* adaptor
* cylonjs.com
*
* Copyright (c) 2013 The Hybrid Group
* Copyright (c) 2013-2014 The Hybrid Group
* Licensed under the Apache 2.0 license.
*/
(function() {
'use strict';
var namespace,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
namespace = require('node-namespace');
"use strict";
require('./basestar');
var namespace = require('node-namespace');
namespace('Cylon', function() {
return this.Adaptor = (function(_super) {
__extends(Adaptor, _super);
namespace("Cylon", function() {
this.Adaptor = (function(klass) {
subclass(Adaptor, klass);
function Adaptor(opts) {
if (opts == null) {
@ -49,5 +43,3 @@
})(Cylon.Basestar);
});
}).call(this);

View File

@ -2,24 +2,18 @@
* driver
* cylonjs.com
*
* Copyright (c) 2013 The Hybrid Group
* Copyright (c) 2013-2014 The Hybrid Group
* Licensed under the Apache 2.0 license.
*/
(function() {
'use strict';
var namespace,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
namespace = require('node-namespace');
require('./basestar');
var namespace = require('node-namespace');
namespace('Cylon', function() {
return this.Driver = (function(_super) {
__extends(Driver, _super);
namespace("Cylon", function() {
this.Driver = (function(klass) {
subclass(Driver, klass);
function Driver(opts) {
if (opts == null) {
@ -51,5 +45,3 @@
})(Cylon.Basestar);
});
}).call(this);