Class: Byebug::AutolistSetting

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

Constant Summary collapse

DEFAULT =
1

Instance Method Summary collapse

Methods inherited from Setting

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

Constructor Details

#initializeAutolistSetting

Returns a new instance of AutolistSetting.



5
6
7
# File 'lib/byebug/settings/autolist.rb', line 5

def initialize
  ListCommand.always_run = DEFAULT
end

Instance Method Details

#helpObject



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

def help
  'If true, `list` command is run everytime byebug stops'
end

#valueObject



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

def value
  ListCommand.always_run == 1
end

#value=(v) ⇒ Object



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

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