Class: Svnx::Status::Entries
- Inherits:
-
Base::Entries
- Object
- Base::Entries
- Svnx::Status::Entries
- Defined in:
- lib/svnx/status/entries.rb
Instance Attribute Summary
Attributes inherited from Base::Entries
Instance Method Summary collapse
- #create_entry(xmlelement) ⇒ Object
- #get_elements(doc) ⇒ Object
-
#initialize(lines, rootpath: nil) ⇒ Entries
constructor
A new instance of Entries.
- #xpath ⇒ Object
Methods inherited from Base::Entries
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 |
#xpath ⇒ Object
14 15 16 |
# File 'lib/svnx/status/entries.rb', line 14 def xpath '//status/target/entry' end |