Class: DebuggerXml::Vim::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/debugger_xml/vim/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger_file) ⇒ Logger



4
5
6
# File 'lib/debugger_xml/vim/logger.rb', line 4

def initialize(logger_file)
  @logger_file = logger_file
end

Instance Method Details

#puts(string) ⇒ Object



8
9
10
11
12
13
# File 'lib/debugger_xml/vim/logger.rb', line 8

def puts(string)
  File.open(@logger_file, 'a') do |f|
    # match vim redir style new lines, rather than trailing
    f << "\ndebugger-xml, #{Time.now.strftime("%H:%M:%S")} : #{string.chomp}"
  end
end