Sha256: 9d69d97c1cce71c2869134fa78dc2febfd42349270d5f0deb7d5c544dbe66545

Contents?: true

Size: 651 Bytes

Versions: 15

Compression:

Stored size: 651 Bytes

Contents

// JSpec - Shell - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)

;(function(){
  
  var _quit = quit
  
  Shell = {
    
    // --- Global
    
    main: this,
    
    // --- Commands
    
    commands: {
      quit: ['Terminate the shell', function(){ _quit() }],
      exit: ['Terminate the shell', function(){ _quit() }]
    },
    
    /**
     * Start the interactive shell.
     *
     * @api public
     */
    
    start : function() {
      for (var name in this.commands)
        if (this.commands.hasOwnProperty(name))
          this.main.__defineGetter__(name, this.commands[name][1])
    }
  }
  
  Shell.start()
  
})()

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
mattpuchlerz-jspec-2.11.0 lib/jspec.shell.js
visionmedia-jspec-2.11.0 lib/jspec.shell.js
visionmedia-jspec-2.11.1 lib/jspec.shell.js
visionmedia-jspec-2.11.2 lib/jspec.shell.js
jspec-2.11.13 lib/jspec.shell.js
jspec-2.11.12 lib/jspec.shell.js
jspec-2.11.10 lib/jspec.shell.js
jspec-2.11.9 lib/jspec.shell.js
jspec-2.11.8 lib/jspec.shell.js
jspec-2.11.7 lib/jspec.shell.js
jspec-2.11.6 lib/jspec.shell.js
jspec-2.11.5 lib/jspec.shell.js
jspec-2.11.4 lib/jspec.shell.js
jspec-2.11.3 lib/jspec.shell.js
jspec-2.11.2 lib/jspec.shell.js