Class: SVNx::Info::Entry

Inherits:
Entry
  • Object
show all
Defined in:
lib/svnx/info/entry.rb

Instance Attribute Summary collapse

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

#kindObject (readonly)

Returns the value of attribute kind.



12
13
14
# File 'lib/svnx/info/entry.rb', line 12

def kind
  @kind
end

#pathObject (readonly)

Returns the value of attribute path.



13
14
15
# File 'lib/svnx/info/entry.rb', line 13

def path
  @path
end

#revisionObject (readonly)

Returns the value of attribute revision.



14
15
16
# File 'lib/svnx/info/entry.rb', line 14

def revision
  @revision
end

#rootObject (readonly)

Returns the value of attribute root.



11
12
13
# File 'lib/svnx/info/entry.rb', line 11

def root
  @root
end

#urlObject (readonly)

Returns the value of attribute url.



10
11
12
# File 'lib/svnx/info/entry.rb', line 10

def url
  @url
end

#wc_rootObject (readonly)

Returns the value of attribute wc_root.



15
16
17
# File 'lib/svnx/info/entry.rb', line 15

def wc_root
  @wc_root
end

Instance Method Details

#set_from_element(elmt) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/svnx/info/entry.rb', line 17

def set_from_element elmt
  set_attr_var elmt, 'kind'
  set_attr_var elmt, 'path'
  set_attr_var elmt, 'revision'
  
  set_elmt_var elmt, 'url'
  
  repo = elmt.elements['repository']
  set_elmt_var repo, 'root'

  @wc_root = nil
  if wcinfo = elmt.elements['wc-info']
    if wcroot = wcinfo.elements['wcroot-abspath']
      @wc_root = wcroot.text
    end
  end
end