123456789_123456789_123456789_123456789_123456789_

Module: IRB::History

Relationships & Source Files
Defined in: lib/irb/history.rb

Class Attribute Summary

Class Method Summary

  • .history_file

    Might be nil when HOME and XDG_CONFIG_HOME are not available.

Class Attribute Details

.infinite?Boolean (readonly)

[ GitHub ]

  
# File 'lib/irb/history.rb', line 15

def infinite?
  save_history.negative?
end

.save_history (readonly)

Integer representation of IRB.conf[:HISTORY_FILE].

[ GitHub ]

  
# File 'lib/irb/history.rb', line 7

def save_history
  IRB.conf[:SAVE_HISTORY].to_i
end

.save_history?Boolean (readonly)

[ GitHub ]

  
# File 'lib/irb/history.rb', line 11

def save_history?
  !save_history.zero?
end

Class Method Details

.history_file

Might be nil when HOME and XDG_CONFIG_HOME are not available.

[ GitHub ]

  
# File 'lib/irb/history.rb', line 20

def history_file
  if (history_file = IRB.conf[:HISTORY_FILE])
    File.expand_path(history_file)
  else
    IRB.rc_file("_history")
  end
end