Method: Muby::InputWindow#saveHistory

Defined in:
lib/muby/inputwindow.rb

#saveHistoryObject

Save our history into the history file.



121
122
123
124
125
126
127
128
129
# File 'lib/muby/inputwindow.rb', line 121

def saveHistory
  # This should be wrapped in something else, which checks for sanity (writability)
  dir = Pathname.new(conf.history_file).parent
  dir.mkpath unless dir.exist?
  file = Pathname.new(conf.history_file)
  file.open("w") do |output|
    Marshal.dump(@history, output)
  end
end