Class: Twin::Conflict::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/twin/conflict.rb

Overview

One file the target owns more recently than the source, with content that actually differs (or could not be checked — remote md5 failed — which is treated as differing, because guessing the other way would overwrite work). target_mtime is nil for remote targets.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#jobObject

Returns the value of attribute job

Returns:

  • (Object)

    the current value of job



41
42
43
# File 'lib/twin/conflict.rb', line 41

def job
  @job
end

#relObject

Returns the value of attribute rel

Returns:

  • (Object)

    the current value of rel



41
42
43
# File 'lib/twin/conflict.rb', line 41

def rel
  @rel
end

#source_mtimeObject

Returns the value of attribute source_mtime

Returns:

  • (Object)

    the current value of source_mtime



41
42
43
# File 'lib/twin/conflict.rb', line 41

def source_mtime
  @source_mtime
end

#source_pathObject

Returns the value of attribute source_path

Returns:

  • (Object)

    the current value of source_path



41
42
43
# File 'lib/twin/conflict.rb', line 41

def source_path
  @source_path
end

#target_mtimeObject

Returns the value of attribute target_mtime

Returns:

  • (Object)

    the current value of target_mtime



41
42
43
# File 'lib/twin/conflict.rb', line 41

def target_mtime
  @target_mtime
end

#target_pathObject

Returns the value of attribute target_path

Returns:

  • (Object)

    the current value of target_path



41
42
43
# File 'lib/twin/conflict.rb', line 41

def target_path
  @target_path
end

Instance Method Details

#age_deltaObject



43
44
45
46
# File 'lib/twin/conflict.rb', line 43

def age_delta
  return nil unless source_mtime && target_mtime
  target_mtime - source_mtime
end