diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-21 05:45:50 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-21 05:45:50 +0000 |
commit | 7e9eb32669348b7e0a5775c8e0fc9566be11fc31 (patch) | |
tree | 96be4fc975e7afab8dbf4c85e04d552760dab34c /lib/irb/ext/save-history.rb | |
parent | 4f7a6aafa57bf57ce4b0b5e323548f0a6385d527 (diff) |
* 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
Diffstat (limited to 'lib/irb/ext/save-history.rb')
-rw-r--r-- | lib/irb/ext/save-history.rb | 11 |
1 files changed, 8 insertions, 3 deletions
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 <code>IRB.conf[:SAVE_HISTORY]</code> def save_history IRB.conf[:SAVE_HISTORY] end + # Sets <code>IRB.conf[:SAVE_HISTORY]</code> 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 <code>IRB.conf[:HISTORY_FILE]</code> def history_file IRB.conf[:HISTORY_FILE] end + # Set <code>IRB.conf[:HISTORY_FILE]</code> 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 |