Class: Svnx::Status::Entries

Inherits:
Base::Entries show all
Defined in:
lib/svnx/status/entries.rb

Instance Attribute Summary

Attributes inherited from Base::Entries

#size

Instance Method Summary collapse

Methods inherited from Base::Entries

#[], #each, #to_index

Constructor Details

#initialize(lines, rootpath: nil) ⇒ Entries

Returns a new instance of Entries.



9
10
11
12
# File 'lib/svnx/status/entries.rb', line 9

def initialize lines, rootpath: nil
  @rootpath = rootpath
  super lines
end

Instance Method Details

#create_entry(xmlelement) ⇒ Object



27
28
29
# File 'lib/svnx/status/entries.rb', line 27

def create_entry xmlelement
  Entry.new xmlelement, rootpath: @rootpath
end

#get_elements(doc) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/svnx/status/entries.rb', line 18

def get_elements doc
  if $use_nokogiri
    doc.xpath xpath
  else
    # status/target
    doc.elements['status'].elements['target'].elements
  end
end

#xpathObject



14
15
16
# File 'lib/svnx/status/entries.rb', line 14

def xpath
  '//status/target/entry'
end