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?, boolean?, exists?, find, #help, help, help_all, #integer?, integer?, load, settings, #to_s, #to_sym

Constructor Details

#initializeAutolistSetting

Returns a new instance of AutolistSetting.



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

def initialize
  ListCommand.always_run = DEFAULT
end

Instance Method Details



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

def banner
  'Invoke list command on every stop'
end

#valueObject



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

def value
  ListCommand.always_run == 1
end

#value=(v) ⇒ Object



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

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