Class: LogEvent
- Inherits:
-
Object
- Object
- LogEvent
- Defined in:
- lib/svn_log/log_event.rb
Instance Attribute Summary collapse
-
#change_list ⇒ Object
readonly
Returns the value of attribute change_list.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(log_event) ⇒ LogEvent
constructor
A new instance of LogEvent.
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_list ⇒ Object (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 |
#message ⇒ Object (readonly)
Returns the value of attribute message.
9 10 11 |
# File 'lib/svn_log/log_event.rb', line 9 def @message end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
5 6 7 |
# File 'lib/svn_log/log_event.rb', line 5 def revision @revision end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
7 8 9 |
# File 'lib/svn_log/log_event.rb', line 7 def @timestamp end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'lib/svn_log/log_event.rb', line 6 def user @user end |