Class: Rails::Rack::Debugger

Inherits:
Object
  • Object
show all
Defined in:
lib/byebug.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Debugger

Returns a new instance of Debugger.



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/byebug.rb', line 274

def initialize(app)
  @app = app

  # clear ARGV so that rails server options aren't passed to IRB
  ARGV.clear

  require 'byebug'

  ::Byebug.start
  puts "=> Byebug enabled"
rescue LoadError
  puts "You're missing the 'byebug' gem. Add it to your Gemfile, bundle " \
       "it and try again."
  exit(1)
end

Instance Method Details

#call(env) ⇒ Object



290
291
292
# File 'lib/byebug.rb', line 290

def call(env)
  @app.call(env)
end