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 * adaptor
* cylonjs.com * cylonjs.com
* *
* Copyright (c) 2013 The Hybrid Group * Copyright (c) 2013-2014 The Hybrid Group
* Licensed under the Apache 2.0 license. * Licensed under the Apache 2.0 license.
*/ */
"use strict";
(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'); require('./basestar');
var namespace = require('node-namespace');
namespace('Cylon', function() { namespace("Cylon", function() {
return this.Adaptor = (function(_super) { this.Adaptor = (function(klass) {
__extends(Adaptor, _super); subclass(Adaptor, klass);
function Adaptor(opts) { function Adaptor(opts) {
if (opts == null) { if (opts == null) {
@ -49,5 +43,3 @@
})(Cylon.Basestar); })(Cylon.Basestar);
}); });
}).call(this);

View File

@ -2,24 +2,18 @@
* driver * driver
* cylonjs.com * cylonjs.com
* *
* Copyright (c) 2013 The Hybrid Group * Copyright (c) 2013-2014 The Hybrid Group
* Licensed under the Apache 2.0 license. * Licensed under the Apache 2.0 license.
*/ */
(function() {
'use strict'; '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'); require('./basestar');
var namespace = require('node-namespace');
namespace('Cylon', function() { namespace("Cylon", function() {
return this.Driver = (function(_super) { this.Driver = (function(klass) {
__extends(Driver, _super); subclass(Driver, klass);
function Driver(opts) { function Driver(opts) {
if (opts == null) { if (opts == null) {
@ -51,5 +45,3 @@
})(Cylon.Basestar); })(Cylon.Basestar);
}); });
}).call(this);