Class: LogParser

Inherits:
Object
  • Object
show all
Defined in:
lib/svn_log/log_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log) ⇒ LogParser

Returns a new instance of LogParser.



7
8
9
10
11
12
# File 'lib/svn_log/log_parser.rb', line 7

def initialize(log)
  doc = Nokogiri::XML(log).xpath('log/logentry')
  @events = doc.collect do |e|
    LogEvent.new e
  end
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



5
6
7
# File 'lib/svn_log/log_parser.rb', line 5

def events
  @events
end