Class: SVNx::Log::Entry
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Instance Method Summary collapse
Methods inherited from Entry
#get_attribute, #get_element_text, #initialize, #set_attr_var, #set_elmt_var, #set_from_xml, #set_var
Constructor Details
This class inherits a constructor from SVNx::Entry
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
11 12 13 |
# File 'lib/svnx/log/entry.rb', line 11 def @author end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
11 12 13 |
# File 'lib/svnx/log/entry.rb', line 11 def date @date end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
11 12 13 |
# File 'lib/svnx/log/entry.rb', line 11 def msg @msg end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
11 12 13 |
# File 'lib/svnx/log/entry.rb', line 11 def paths @paths end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
11 12 13 |
# File 'lib/svnx/log/entry.rb', line 11 def revision @revision end |
Instance Method Details
#match(action, filter) ⇒ Object
42 43 44 45 46 |
# File 'lib/svnx/log/entry.rb', line 42 def match action, filter paths.select do |path| path.match? action, filter end end |
#message ⇒ Object
34 35 36 |
# File 'lib/svnx/log/entry.rb', line 34 def @msg end |
#set_from_element(elmt) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/svnx/log/entry.rb', line 13 def set_from_element elmt set_attr_var elmt, 'revision' %w{ author date msg }.each do |field| set_elmt_var elmt, field end @paths = Array.new elmt.elements.each('paths/path') do |pe| kind = get_attribute pe, 'kind' action = get_attribute pe, 'action' name = pe.text @paths << LogEntryPath.new(kind: kind, action: SVNx::Action.new(action), name: name) end # Svn isn't consistent with the order of paths @paths.sort! end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/svnx/log/entry.rb', line 38 def to_s [ @revision, @author, @date, @msg, @paths ].collect { |x| x.to_s }.join " " end |