Sha256: 565558c0b4c5130c873450c3b2d86e2925e54cbb3cc01121d14ac5335e311441

Contents?: true

Size: 820 Bytes

Versions: 39

Compression:

Stored size: 820 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() }],
      p: ['Inspect an object', function(o){ return o.toSource() }]
    },
    
    /**
     * Start the interactive shell.
     *
     * @api public
     */
    
    start : function() {
      for (var name in this.commands)
        if (this.commands.hasOwnProperty(name))
          this.commands[name][1].length ?
            this.main[name] = this.commands[name][1] :
              this.main.__defineGetter__(name, this.commands[name][1])
    }
  }
  
  Shell.start()
  
})()

Version data entries

39 entries across 39 versions & 6 rubygems

Version Path
set_builder-2.0.0.beta2 spec/lib/jspec.shell.js
set_builder-2.0.0.beta1 spec/lib/jspec.shell.js
set_builder-1.2.0.beta3 spec/lib/jspec.shell.js
set_builder-1.2.0.beta2 spec/lib/jspec.shell.js
set_builder-1.2.0.beta1 spec/lib/jspec.shell.js
set_builder-1.1.0 spec/lib/jspec.shell.js
set_builder-1.0.2 spec/lib/jspec.shell.js
gentooboontoo-jspec-4.3.3 lib/jspec.shell.js
bootcamp-0.1.4 vendor/test_suites/jspec/lib/jspec.shell.js
bootcamp-0.1.0 vendor/test_suites/jspec/lib/jspec.shell.js
uki-1.1.4 frameworks/jspec/lib/jspec.shell.js
uki-1.1.3 frameworks/jspec/lib/jspec.shell.js
uki-1.1.2 frameworks/jspec/lib/jspec.shell.js
jspec-4.3.3 lib/jspec.shell.js
jspec-4.3.2 lib/jspec.shell.js
jspec-steventux-3.3.2.1 lib/jspec.shell.js
jspec-steventux-3.3.2 lib/jspec.shell.js
jspec-4.3.1 lib/jspec.shell.js
jspec-4.3.0 lib/jspec.shell.js
uki-1.1.1 frameworks/jspec/lib/jspec.shell.js