Class: Debugger::Xml::Vim::Logger
- Inherits:
-
Object
- Object
- Debugger::Xml::Vim::Logger
- Defined in:
- lib/debugger/xml/vim/logger.rb
Instance Method Summary collapse
-
#initialize(logger_file) ⇒ Logger
constructor
A new instance of Logger.
- #puts(string) ⇒ Object
Constructor Details
#initialize(logger_file) ⇒ Logger
Returns a new instance of Logger.
5 6 7 |
# File 'lib/debugger/xml/vim/logger.rb', line 5 def initialize(logger_file) @logger_file = logger_file end |
Instance Method Details
#puts(string) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/debugger/xml/vim/logger.rb', line 9 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 |