UNPKG

749 BJavaScriptView Raw
1(function() {
2 var App, Pry, pry;
3
4 App = require('./pry/app');
5
6 Pry = (function() {
7 function Pry(arg) {
8 var repl;
9 this.isStandAlone = (arg != null ? arg : {}).isStandAlone;
10 repl = function(_) {
11 return pry.open((function(_this) {
12 return function(input) {
13 return _ = eval(input);
14 };
15 })(this));
16 };
17 this.it = '(' + repl.toString() + ').call(this)';
18 }
19
20 Pry.prototype.open = function(scope) {
21 var app;
22 app = new App(scope, this.isStandAlone);
23 return app.open();
24 };
25
26 return Pry;
27
28 })();
29
30 module.exports = new Pry;
31
32 if (require.main === module) {
33 eval((pry = new Pry({
34 isStandAlone: true
35 })).it);
36 }
37
38}).call(this);