Class: LogEvent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log_event) ⇒ LogEvent

Returns a new instance of LogEvent.



11
12
13
14
15
16
17
18
19
# File 'lib/svn_log/log_event.rb', line 11

def initialize(log_event)
  @revision = log_event.attribute('revision').value
  @user = log_event.xpath('author').text
  @timestamp = DateTime.parse(log_event.xpath('date').text)
  @message = log_event.xpath('msg').text
  @change_list = log_event.xpath('paths/path').collect do |path|
    Modification.parse(path)
  end
end

Instance Attribute Details

#change_listObject (readonly)

Returns the value of attribute change_list.



8
9
10
# File 'lib/svn_log/log_event.rb', line 8

def change_list
  @change_list
end

#messageObject (readonly)

Returns the value of attribute message.



9
10
11
# File 'lib/svn_log/log_event.rb', line 9

def message
  @message
end

#revisionObject (readonly)

Returns the value of attribute revision.



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

def revision
  @revision
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



7
8
9
# File 'lib/svn_log/log_event.rb', line 7

def timestamp
  @timestamp
end

#userObject (readonly)

Returns the value of attribute user.



6
7
8
# File 'lib/svn_log/log_event.rb', line 6

def user
  @user
end