Make even shorter syntax by removing redundant Adaptors and Drivers
This commit is contained in:
parent
ed50c385c4
commit
6c1e591f84
|
@ -17,7 +17,7 @@
|
|||
|
||||
require('./basestar');
|
||||
|
||||
namespace('Cylon.Adaptors', function() {
|
||||
namespace('Cylon', function() {
|
||||
return this.Adaptor = (function(_super) {
|
||||
__extends(Adaptor, _super);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
require('./basestar');
|
||||
|
||||
namespace('Cylon.Drivers', function() {
|
||||
namespace('Cylon', function() {
|
||||
return this.Driver = (function(_super) {
|
||||
__extends(Driver, _super);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
return Loopback;
|
||||
|
||||
})(Cylon.Adaptors.Adaptor);
|
||||
})(Cylon.Adaptor);
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
return Ping;
|
||||
|
||||
})(Cylon.Drivers.Driver);
|
||||
})(Cylon.Driver);
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace = require 'node-namespace'
|
|||
|
||||
require './basestar'
|
||||
|
||||
namespace 'Cylon.Adaptors', ->
|
||||
namespace 'Cylon', ->
|
||||
class @Adaptor extends Cylon.Basestar
|
||||
constructor: (opts={}) ->
|
||||
@self = this
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace = require 'node-namespace'
|
|||
|
||||
require './basestar'
|
||||
|
||||
namespace 'Cylon.Drivers', ->
|
||||
namespace 'Cylon', ->
|
||||
class @Driver extends Cylon.Basestar
|
||||
constructor: (opts={}) ->
|
||||
@self = this
|
||||
|
|
|
@ -15,6 +15,6 @@ module.exports =
|
|||
new Cylon.Adaptors.Loopback(args...)
|
||||
|
||||
namespace 'Cylon.Adaptors', ->
|
||||
class @Loopback extends Cylon.Adaptors.Adaptor
|
||||
class @Loopback extends Cylon.Adaptor
|
||||
commands: ->
|
||||
['ping']
|
||||
|
|
|
@ -15,7 +15,7 @@ module.exports =
|
|||
new Cylon.Drivers.Ping(args...)
|
||||
|
||||
namespace 'Cylon.Drivers', ->
|
||||
class @Ping extends Cylon.Drivers.Driver
|
||||
class @Ping extends Cylon.Driver
|
||||
commands: ->
|
||||
['ping']
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
describe("Adaptor", function() {
|
||||
var adaptor;
|
||||
adaptor = new Cylon.Adaptors.Adaptor({
|
||||
adaptor = new Cylon.Adaptor({
|
||||
name: 'adapt'
|
||||
});
|
||||
return it('needs tests');
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
describe("Driver", function() {
|
||||
var driver;
|
||||
driver = new Cylon.Drivers.Driver({
|
||||
driver = new Cylon.Driver({
|
||||
name: 'max',
|
||||
device: {
|
||||
connection: 'connect',
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
source "adaptor"
|
||||
|
||||
describe "Adaptor", ->
|
||||
adaptor = new Cylon.Adaptors.Adaptor(name: 'adapt')
|
||||
adaptor = new Cylon.Adaptor(name: 'adapt')
|
||||
|
||||
it 'needs tests'
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
source "driver"
|
||||
|
||||
describe "Driver", ->
|
||||
driver = new Cylon.Drivers.Driver(name: 'max', device: {connection: 'connect', pin: 13})
|
||||
driver = new Cylon.Driver(name: 'max', device: {connection: 'connect', pin: 13})
|
||||
|
||||
it 'needs tests'
|
||||
|
|
Loading…
Reference in New Issue