Class: Grape::App::CLI::Runner

Inherits:
Thor
  • Object
show all
Defined in:
lib/grape/app/cli.rb

Instance Method Summary collapse

Instance Method Details

#console(env = 'development') ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'lib/grape/app/cli.rb', line 33

def console(env = 'development')
  ENV['GRAPE_ENV'] = env
  require File.expand_path('config/environment', Dir.pwd)

  require 'irb'
  require 'irb/completion'

  ARGV.clear
  IRB.start
end