Sha256: e51173c5d6bd1ea842c4e2717a74ef7295e681145f60d7bbd8035f4f851f1236

Contents?: true

Size: 312 Bytes

Versions: 1

Compression:

Stored size: 312 Bytes

Contents

Terminus = {
  connect: function(endpoint) {
    if (this._client) return;
    
    this._client = new Faye.Client(endpoint);
    this._client.subscribe('/terminus/commands', function(message) {
      this.execute(message.command);
    }, this);
  },
  
  execute: function(command) {
    eval(command);
  }
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
terminus-0.1.0 lib/public/terminus.js