Class: Svn::Log::ChangedPathStruct
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Svn::Log::ChangedPathStruct
- Defined in:
- lib/svn/logs.rb
Overview
description of a changed path
Instance Method Summary collapse
-
#action ⇒ Object
returns a character that represents the type of the change: :added, :deleted, :replaced, :modified.
-
#copied_from ⇒ Object
if the node was copied from another path/rev, returns the [path, rev] pair or nil otherwise.
-
#copyfrom_known? ⇒ Boolean
returns whether the “copied from” values are known.
-
#kind ⇒ Object
returns the path’s node type (:none, :file, :dir, :unknown).
- #to_h ⇒ Object
Instance Method Details
#action ⇒ Object
returns a character that represents the type of the change: :added, :deleted, :replaced, :modified
20 21 22 |
# File 'lib/svn/logs.rb', line 20 def action Actions[ self[:action] ] end |
#copied_from ⇒ Object
if the node was copied from another path/rev, returns the [path, rev] pair or nil otherwise
36 37 38 |
# File 'lib/svn/logs.rb', line 36 def copied_from [ self[:copyfrom_path], self[:copyfrom_rev] ] if copyfrom_known? end |
#copyfrom_known? ⇒ Boolean
returns whether the “copied from” values are known
30 31 32 |
# File 'lib/svn/logs.rb', line 30 def copyfrom_known? ( self[:copyfrom_rev] >= 0 ) end |
#kind ⇒ Object
returns the path’s node type (:none, :file, :dir, :unknown)
25 26 27 |
# File 'lib/svn/logs.rb', line 25 def kind self[:node_kind] end |
#to_h ⇒ Object
40 41 42 43 44 |
# File 'lib/svn/logs.rb', line 40 def to_h h = { :action => action, :kind => kind } h[:copied_from] = copied_from if copyfrom_known? h end |