hybridgroup/cylon — pull request #20 by stewart (2013-11-04 20:30:06+00:00)
Title: Namespace modules

Namespaces some classes in Cylon. Keeps around module.exports so previously defined `require()`s will still work:

```coffee-script
namespace = require 'node-namespace'

namespace 'Cylon', ->
class @Robot
# awesome robot stuff

module.exports = Cylon.robot
```

So now you can use the classes like this:

```coffee-script
require 'robot'
robot = new Cylon.Robot(name: "Tom Servo")
```

Or like this:

```coffee-script
Robot = require 'robot'
robot = new Robot(name: "Crow")
```