Class: Svn::Log::Application::SearchCommand::SvnLogXmlPrinter
- Inherits:
-
Object
- Object
- Svn::Log::Application::SearchCommand::SvnLogXmlPrinter
- Defined in:
- lib/svnlog.rb
Overview
Prints entries in the ‘svn log’ xml format
Class Method Summary collapse
Class Method Details
.print(entries) ⇒ Object
197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/svnlog.rb', line 197 def self.print(entries) return unless entries.size > 0 puts "<?xml version=\"1.0\"?>" puts "<log>" for entry in entries puts "<logentry revision=\"#{entry[:revision]}\">" puts "<author>#{entry[:author]}</author>" puts "<date>#{entry[:date]}</date>" puts "<msg>#{entry[:message]}</msg>" puts "</logentry>" end puts "</log>" end |