Class: Byebug::PostMortemSetting

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

Constant Summary

Constants inherited from Setting

Setting::DEFAULT

Instance Method Summary collapse

Methods inherited from Setting

[], []=, boolean?, #boolean?, exists?, find, format, #initialize, integer?, #integer?, load, settings, #to_s, #to_sym

Constructor Details

This class inherits a constructor from Byebug::Setting

Instance Method Details

#helpObject



3
4
5
# File 'lib/byebug/settings/post_mortem.rb', line 3

def help
  'Enable/disable post-mortem mode'
end

#valueObject



12
13
14
# File 'lib/byebug/settings/post_mortem.rb', line 12

def value
  Byebug.post_mortem?
end

#value=(v) ⇒ Object



7
8
9
10
# File 'lib/byebug/settings/post_mortem.rb', line 7

def value=(v)
  Byebug.post_mortem = v
  at_exit { handle_post_mortem if Byebug.post_mortem? }
end