Install node-repl-promised:
npm install -g repl-promised
Use the repl to list all users
$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
| require 'active_support/inflector' | |
| require 'benchmark' | |
| class James | |
| end | |
| class John | |
| end | |
| class Jimmy |
Install node-repl-promised:
npm install -g repl-promised
Use the repl to list all users
$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
| def happy_birthday(name, torture_level = 100) | |
| hb = "Happy Birthday to You." | |
| song = "#{hb} #{hb} Happy Birthday Dear #{name}. #{hb}" | |
| song.chars.reduce do |memo, char| | |
| %w[a e i o u y].include?(char) ? memo + char * torture_level : memo + char | |
| end | |
| end |