Class: SVNx::Status::Entry
- Includes:
- Comparable, Logue::Loggable
- Defined in:
- lib/svnx/status/entry.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#commit_revision ⇒ Object
readonly
Returns the value of attribute commit_revision.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_revision ⇒ Object
readonly
Returns the value of attribute status_revision.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(args) ⇒ Entry
constructor
A new instance of Entry.
- #set_from_element(elmt) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Entry
#get_attribute, #get_element_text, #set_attr_var, #set_elmt_var, #set_from_xml, #set_var
Constructor Details
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
16 17 18 |
# File 'lib/svnx/status/entry.rb', line 16 def action @action end |
#commit_revision ⇒ Object (readonly)
Returns the value of attribute commit_revision.
17 18 19 |
# File 'lib/svnx/status/entry.rb', line 17 def commit_revision @commit_revision end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/svnx/status/entry.rb', line 18 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
14 15 16 |
# File 'lib/svnx/status/entry.rb', line 14 def path @path end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
13 14 15 |
# File 'lib/svnx/status/entry.rb', line 13 def status @status end |
#status_revision ⇒ Object (readonly)
Returns the value of attribute status_revision.
15 16 17 |
# File 'lib/svnx/status/entry.rb', line 15 def status_revision @status_revision end |
Instance Method Details
#<=>(other) ⇒ Object
51 52 53 |
# File 'lib/svnx/status/entry.rb', line 51 def <=> other path <=> other.path end |
#set_from_element(elmt) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/svnx/status/entry.rb', line 26 def set_from_element elmt set_attr_var elmt, 'path' wcstatus = elmt.elements['wc-status'] @status = SVNx::Action.new(wcstatus.attributes['item']) @status_revision = wcstatus.attributes['revision'] commit = wcstatus.elements['commit'] @commit_revision = commit && commit.attributes['revision'] @name = @path.dup info "@name: #{@name}" info "@path: #{@path}" info "@rootpath: #{@rootpath}" if @rootpath # name is prefixed with directory unless '.' is used as the argument @name.sub! Regexp.new('^' + @rootpath), '' end end |
#to_s ⇒ Object
47 48 49 |
# File 'lib/svnx/status/entry.rb', line 47 def to_s "path: #{@path}; status: #{@status}" end |