From 7e9eb32669348b7e0a5775c8e0fc9566be11fc31 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 21 Dec 2012 05:45:50 +0000 Subject: * lib/irb.rb, lib/irb/*: Documentation for IRB git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb/ext/save-history.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/irb/ext/save-history.rb') diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb index f9c983ac11..3e0740d6fa 100644 --- a/lib/irb/ext/save-history.rb +++ b/lib/irb/ext/save-history.rb @@ -11,21 +11,24 @@ require "readline" module IRB - module HistorySavingAbility + module HistorySavingAbility # :nodoc: @RCS_ID='-$Id$-' end class Context - def init_save_history + def init_save_history# :nodoc: unless (class<<@io;self;end).include?(HistorySavingAbility) @io.extend(HistorySavingAbility) end end + # A copy of the default IRB.conf[:SAVE_HISTORY] def save_history IRB.conf[:SAVE_HISTORY] end + # Sets IRB.conf[:SAVE_HISTORY] to the given +val+ and calls + # #init_save_history with this context. def save_history=(val) IRB.conf[:SAVE_HISTORY] = val if val @@ -35,16 +38,18 @@ module IRB end end + # A copy of the default IRB.conf[:HISTORY_FILE] def history_file IRB.conf[:HISTORY_FILE] end + # Set IRB.conf[:HISTORY_FILE] to the given +hist+. def history_file=(hist) IRB.conf[:HISTORY_FILE] = hist end end - module HistorySavingAbility + module HistorySavingAbility # :nodoc: include Readline # def HistorySavingAbility.create_finalizer -- cgit v1.2.3