Module: IRB::History
- Defined in:
- lib/irb/history.rb
Class Method Summary collapse
-
.history_file ⇒ Object
Might be nil when HOME and XDG_CONFIG_HOME are not available.
- .infinite? ⇒ Boolean
-
.save_history ⇒ Object
Integer representation of
IRB.conf[:HISTORY_FILE]
. - .save_history? ⇒ Boolean
Class Method Details
.history_file ⇒ Object
Might be nil when HOME and XDG_CONFIG_HOME are not available.
20 21 22 23 24 25 26 |
# File 'lib/irb/history.rb', line 20 def history_file if (history_file = IRB.conf[:HISTORY_FILE]) File.(history_file) else IRB.rc_file("_history") end end |
.infinite? ⇒ Boolean
15 16 17 |
# File 'lib/irb/history.rb', line 15 def infinite? save_history.negative? end |
.save_history ⇒ Object
Integer representation of IRB.conf[:HISTORY_FILE]
.
7 8 9 |
# File 'lib/irb/history.rb', line 7 def save_history IRB.conf[:SAVE_HISTORY].to_i end |
.save_history? ⇒ Boolean
11 12 13 |
# File 'lib/irb/history.rb', line 11 def save_history? !save_history.zero? end |