Class: Byebug::HistfileSetting

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

Instance Attribute Summary

Attributes inherited from Setting

#value

Instance Method Summary collapse

Methods inherited from Setting

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

Constructor Details

#initializeHistfileSetting

Returns a new instance of HistfileSetting.



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

def initialize
  @value = File.expand_path("#{ENV['HOME']||'.'}/.byebug_hist")
end

Instance Method Details

#helpObject



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

def help
  "Customize file where history is loaded from and saved to. By default, " \
  "~/.byebug_hist"
end

#to_sObject



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

def to_s
  "The command history file is #{value}\n"
end