Class: Byebug::AutolistSetting

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

Overview

Setting for automatically listing source code on every stop.

Constant Summary collapse

DEFAULT =
1

Instance Method Summary collapse

Methods inherited from Setting

[], []=, #boolean?, find, #help, help_all, #integer?, settings, #to_s, #to_sym

Constructor Details

#initializeAutolistSetting

Returns a new instance of AutolistSetting.



13
14
15
# File 'lib/byebug/settings/autolist.rb', line 13

def initialize
  ListCommand.always_run = DEFAULT
end

Instance Method Details



17
18
19
# File 'lib/byebug/settings/autolist.rb', line 17

def banner
  "Invoke list command on every stop"
end

#valueObject



25
26
27
# File 'lib/byebug/settings/autolist.rb', line 25

def value
  ListCommand.always_run == 1
end

#value=(val) ⇒ Object



21
22
23
# File 'lib/byebug/settings/autolist.rb', line 21

def value=(val)
  ListCommand.always_run = val ? 1 : 0
end