Class: Svn::ChangedPathStruct

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/svn/misc.rb

Instance Method Summary collapse

Instance Method Details

#change_kindObject



31
32
33
# File 'lib/svn/misc.rb', line 31

def change_kind
  self[ :change_kind ]
end

#copied_fromObject



51
52
53
# File 'lib/svn/misc.rb', line 51

def copied_from
  [ self[:copyfrom_path], self[:copyfrom_rev] ] unless copyfrom_known?
end

#copyfrom_known?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/svn/misc.rb', line 47

def copyfrom_known?
  ( self[ :copyfrom_known ] == 1 )
end

#node_kindObject



35
36
37
# File 'lib/svn/misc.rb', line 35

def node_kind
  self[ :node_kind ]
end

#prop_mods?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/svn/misc.rb', line 43

def prop_mods?
  ( self[ :prop_mods ] == 1 )
end

#text_mods?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/svn/misc.rb', line 39

def text_mods?
  ( self[ :text_mods ] == 1 )
end

#to_hObject



55
56
57
58
59
60
61
62
63
64
# File 'lib/svn/misc.rb', line 55

def to_h
  h = {
      :change_kind => change_kind,
      :node_kind => node_kind,
      :text_mods? => text_mods?,
      :prop_mods? => prop_mods?,
    }
  h[:copied_from] = copied_from if copyfrom_known?
  h
end