From 05cc4221aa5e40332f5d1a898e05ae2e143e7b31 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Sun, 20 Oct 2013 13:59:12 -0700 Subject: [PATCH] Better naming for connection and device types --- src/robot.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/robot.coffee b/src/robot.coffee index 7ed3065..3ce9282 100644 --- a/src/robot.coffee +++ b/src/robot.coffee @@ -14,8 +14,8 @@ Device = source("device") module.exports = class Robot constructor: (opts) -> opts ?= {} - @_connections = {} - @_devices = {} + @connectionTypes = {} + @deviceTypes = {} @name = opts.name or @constructor.randomName() @connections = initConnections(opts.connection or opts.connections or {}) @devices = initDevices(opts.device or opts.devices or {}) @@ -32,7 +32,7 @@ module.exports = class Robot initConnection = (connection) -> console.log "Initializing connection '#{ connection.name }'..." - @_connections[connection.name] = new Connection(connection) + @connectionTypes[connection.name] = new Connection(connection) initDevices = (devices) -> console.log "Initializing devices..." @@ -40,7 +40,7 @@ module.exports = class Robot initDevice = (device) -> console.log "Initializing device '#{ device.name }'..." - @_devices[device.name] = new Device(device) + @deviceTypes[device.name] = new Device(device) startConnections = -> console.log "Starting connections..."